Lines Matching refs:error

53 	int error;
55 error = pthread_mutex_init(lock, NULL);
56 PJDLOG_ASSERT(error == 0);
61 int error;
63 error = pthread_mutex_destroy(lock);
64 PJDLOG_ASSERT(error == 0);
69 int error;
71 error = pthread_mutex_lock(lock);
72 PJDLOG_ASSERT(error == 0);
77 int error;
79 error = pthread_mutex_trylock(lock);
80 PJDLOG_ASSERT(error == 0 || error == EBUSY);
81 return (error == 0);
86 int error;
88 error = pthread_mutex_unlock(lock);
89 PJDLOG_ASSERT(error == 0);
101 int error;
103 error = pthread_rwlock_init(lock, NULL);
104 PJDLOG_ASSERT(error == 0);
109 int error;
111 error = pthread_rwlock_destroy(lock);
112 PJDLOG_ASSERT(error == 0);
117 int error;
119 error = pthread_rwlock_rdlock(lock);
120 PJDLOG_ASSERT(error == 0);
125 int error;
127 error = pthread_rwlock_wrlock(lock);
128 PJDLOG_ASSERT(error == 0);
133 int error;
135 error = pthread_rwlock_unlock(lock);
136 PJDLOG_ASSERT(error == 0);
143 int error;
145 error = pthread_condattr_init(&attr);
146 PJDLOG_ASSERT(error == 0);
148 error = pthread_condattr_setclock(&attr, CLOCK_MONOTONIC);
149 PJDLOG_ASSERT(error == 0);
151 error = pthread_cond_init(cv, &attr);
152 PJDLOG_ASSERT(error == 0);
153 error = pthread_condattr_destroy(&attr);
154 PJDLOG_ASSERT(error == 0);
159 int error;
161 error = pthread_cond_wait(cv, lock);
162 PJDLOG_ASSERT(error == 0);
168 int error;
176 error = clock_gettime(CLOCK_MONOTONIC, &ts);
177 PJDLOG_ASSERT(error == 0);
179 error = pthread_cond_timedwait(cv, lock, &ts);
183 error = pthread_cond_timedwait_relative_np(cv, lock, &ts);
185 #error Neither pthread_condattr_setclock nor pthread_cond_timedwait_relative_np is available.
187 PJDLOG_ASSERT(error == 0 || error == ETIMEDOUT);
188 return (error == ETIMEDOUT);
193 int error;
195 error = pthread_cond_signal(cv);
196 PJDLOG_ASSERT(error == 0);
201 int error;
203 error = pthread_cond_broadcast(cv);
204 PJDLOG_ASSERT(error == 0);