MCPcopy Create free account
hub / github.com/acl-dev/acl / queue_qlen

Function queue_qlen

lib_fiber/c/src/common/queue.c:275–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

273}
274
275int queue_qlen(QUEUE* que)
276{
277 int status, n;
278
279 status = pthread_mutex_lock(&que->lock);
280 if (status) {
281 msg_error("%s(%d): pthread_mutex_lock error(%s)",
282 __FUNCTION__, __LINE__, strerror(status));
283 return -1;
284 }
285
286 n = que->qlen;
287
288 status = pthread_mutex_unlock(&que->lock);
289 if (status) {
290 msg_error("%s(%d): pthread_mutex_unlock error(%s)",
291 __FUNCTION__, __LINE__, strerror(status));
292 return -1;
293 }
294
295 return n;
296}
297
298void queue_set_quit(QUEUE *que)
299{

Callers

nothing calls this directly

Calls 3

pthread_mutex_lockFunction · 0.85
pthread_mutex_unlockFunction · 0.85
msg_errorFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…