Lines Matching refs:err

22 static void error_exit(int err, const char *msg)
24 fprintf(stderr, "qemu: %s: %s\n", msg, strerror(err));
30 int err;
32 err = pthread_mutex_init(&mutex->lock, NULL);
33 if (err)
34 error_exit(err, __func__);
39 int err;
41 err = pthread_mutex_destroy(&mutex->lock);
42 if (err)
43 error_exit(err, __func__);
48 int err;
50 err = pthread_mutex_lock(&mutex->lock);
51 if (err)
52 error_exit(err, __func__);
72 int err;
78 err = pthread_mutex_timedlock(&mutex->lock, &ts);
79 if (err && err != ETIMEDOUT)
80 error_exit(err, __func__);
81 return err;
86 int err;
88 err = pthread_mutex_unlock(&mutex->lock);
89 if (err)
90 error_exit(err, __func__);
95 int err;
97 err = pthread_cond_init(&cond->cond, NULL);
98 if (err)
99 error_exit(err, __func__);
104 int err;
106 err = pthread_cond_destroy(&cond->cond);
107 if (err)
108 error_exit(err, __func__);
113 int err;
115 err = pthread_cond_signal(&cond->cond);
116 if (err)
117 error_exit(err, __func__);
122 int err;
124 err = pthread_cond_broadcast(&cond->cond);
125 if (err)
126 error_exit(err, __func__);
131 int err;
133 err = pthread_cond_wait(&cond->cond, &mutex->lock);
134 if (err)
135 error_exit(err, __func__);
141 int err;
146 err = pthread_cond_timedwait(&cond->cond, &mutex->lock, &ts);
147 if (err && err != ETIMEDOUT)
148 error_exit(err, __func__);
149 return err;
156 int err;
163 err = pthread_create(&thread->thread, NULL, start_routine, arg);
164 if (err)
165 error_exit(err, __func__);
172 int err;
174 err = pthread_kill(thread->thread, sig);
175 if (err)
176 error_exit(err, __func__);