Lines Matching refs:buf
72 void call_mutex_init(pthread_mutex_t * mutex, char *buf, size_t buf_len)
78 strerror_r(ret, buf, buf_len));
82 void call_mutex_lock(pthread_mutex_t * mutex, char *buf, size_t buf_len)
88 strerror_r(ret, buf, buf_len));
92 void call_mutex_unlock(pthread_mutex_t * mutex, char *buf, size_t buf_len)
98 strerror_r(ret, buf, buf_len));
102 void call_cond_init(pthread_cond_t * cond, char *buf, size_t buf_len)
108 strerror_r(ret, buf, buf_len));
113 char *buf, size_t buf_len)
119 strerror_r(ret, buf, buf_len));
123 void call_cond_signal(pthread_cond_t * cond, char *buf, size_t buf_len)
129 strerror_r(ret, buf, buf_len));
134 char *buf, size_t buf_len, int i)
142 strerror_r(errno, buf, buf_len));
150 call_mutex_lock(mutex, buf, buf_len);
161 call_mutex_unlock(mutex, buf, buf_len);
167 char buf[1024];
170 call_mutex_lock(&ack, buf, sizeof(buf));
172 call_cond_signal(&parent, buf, sizeof(buf));
173 call_mutex_lock(&req, buf, sizeof(buf));
174 call_mutex_unlock(&ack, buf, sizeof(buf));
176 call_mutex_lock(&wait, buf, sizeof(buf));
177 call_cond_signal(&parent, buf, sizeof(buf));
178 call_mutex_unlock(&wait, buf, sizeof(buf));
180 call_cond_wait(&child, &req, buf, sizeof(buf));
181 call_mutex_unlock(&req, buf, sizeof(buf));
185 void create_child_thread(char *buf, size_t buf_len)
193 strerror_r(ret, buf, buf_len));
199 strerror_r(ret, buf, buf_len));
203 strerror_r(ret, buf, buf_len));
208 strerror_r(ret, buf, buf_len));
227 char buf[1024];
251 call_mutex_init(&req, buf, sizeof(buf));
252 call_mutex_init(&ack, buf, sizeof(buf));
253 call_mutex_init(&wait, buf, sizeof(buf));
254 call_cond_init(&parent, buf, sizeof(buf));
255 call_cond_init(&child, buf, sizeof(buf));
257 call_mutex_lock(&ack, buf, sizeof(buf));
259 create_child_thread(buf, sizeof(buf));
264 call_cond_wait(&parent, &ack, buf, sizeof(buf));
267 call_mutex_unlock(&ack, buf, sizeof(buf));
269 do_timedwait(&parent, &wait, buf, sizeof(buf), i);
271 call_mutex_lock(&req, buf, sizeof(buf));
272 call_cond_signal(&child, buf, sizeof(buf));
273 call_mutex_unlock(&req, buf, sizeof(buf));
281 call_mutex_lock(&ack, buf, sizeof(buf));