| 36 | }; |
| 37 | |
| 38 | QUEUE *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 | |
| 56 | void queue_check_owner(QUEUE *que, char flag) |
| 57 | { |
nothing calls this directly
no test coverage detected
searching dependent graphs…