Lines Matching refs:error

51 	int error;
53 error = pthread_mutex_init(lock, NULL);
54 PJDLOG_ASSERT(error == 0);
59 int error;
61 error = pthread_mutex_destroy(lock);
62 PJDLOG_ASSERT(error == 0);
67 int error;
69 error = pthread_mutex_lock(lock);
70 PJDLOG_ASSERT(error == 0);
75 int error;
77 error = pthread_mutex_trylock(lock);
78 PJDLOG_ASSERT(error == 0 || error == EBUSY);
79 return (error == 0);
84 int error;
86 error = pthread_mutex_unlock(lock);
87 PJDLOG_ASSERT(error == 0);
99 int error;
101 error = pthread_rwlock_init(lock, NULL);
102 PJDLOG_ASSERT(error == 0);
107 int error;
109 error = pthread_rwlock_destroy(lock);
110 PJDLOG_ASSERT(error == 0);
115 int error;
117 error = pthread_rwlock_rdlock(lock);
118 PJDLOG_ASSERT(error == 0);
123 int error;
125 error = pthread_rwlock_wrlock(lock);
126 PJDLOG_ASSERT(error == 0);
131 int error;
133 error = pthread_rwlock_unlock(lock);
134 PJDLOG_ASSERT(error == 0);
141 int error;
143 error = pthread_condattr_init(&attr);
144 PJDLOG_ASSERT(error == 0);
146 error = pthread_condattr_setclock(&attr, CLOCK_MONOTONIC);
147 PJDLOG_ASSERT(error == 0);
149 error = pthread_cond_init(cv, &attr);
150 PJDLOG_ASSERT(error == 0);
151 error = pthread_condattr_destroy(&attr);
152 PJDLOG_ASSERT(error == 0);
157 int error;
159 error = pthread_cond_wait(cv, lock);
160 PJDLOG_ASSERT(error == 0);
166 int error;
174 error = clock_gettime(CLOCK_MONOTONIC, &ts);
175 PJDLOG_ASSERT(error == 0);
177 error = pthread_cond_timedwait(cv, lock, &ts);
181 error = pthread_cond_timedwait_relative_np(cv, lock, &ts);
183 #error Neither pthread_condattr_setclock nor pthread_cond_timedwait_relative_np is available.
185 PJDLOG_ASSERT(error == 0 || error == ETIMEDOUT);
186 return (error == ETIMEDOUT);
191 int error;
193 error = pthread_cond_signal(cv);
194 PJDLOG_ASSERT(error == 0);
199 int error;
201 error = pthread_cond_broadcast(cv);
202 PJDLOG_ASSERT(error == 0);