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

Function queue_new

lib_fiber/c/src/common/queue.c:38–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36};
37
38QUEUE *queue_new(void)
39{
40 QUEUE *que = (QUEUE *) malloc(sizeof(QUEUE));
41
42 pthread_mutex_init(&que->lock, NULL);
43 pthread_cond_init(&que->cond, NULL);
44
45 que->first = que->last = NULL;
46 que->qlen = 0;
47 que->error = QUEUE_OK;
48 que->quit = 0;
49 que->nlink = 0;
50 que->owner = thread_self();
51 que->check_owner = 0;
52
53 return que;
54}
55
56void queue_check_owner(QUEUE *que, char flag)
57{

Callers

nothing calls this directly

Calls 3

mallocFunction · 0.85
pthread_mutex_initFunction · 0.85
thread_selfFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…