| 7671 | dist_worker_job_queue_clear_locked(q); |
| 7672 | pthread_mutex_unlock(&q->mu); |
| 7673 | pthread_cond_destroy(&q->not_full); |
| 7674 | pthread_cond_destroy(&q->not_empty); |
| 7675 | pthread_mutex_destroy(&q->mu); |
| 7676 | } |
| 7677 | |
| 7678 | static void dist_worker_job_queue_finish(ds4_dist_worker_job_queue *q) { |
| 7679 | pthread_mutex_lock(&q->mu); |
| 7680 | q->closed = true; |
| 7681 | pthread_cond_broadcast(&q->not_empty); |
| 7682 | pthread_cond_broadcast(&q->not_full); |
| 7683 | pthread_mutex_unlock(&q->mu); |
| 7684 | } |
| 7685 | |
| 7686 | static void dist_worker_job_queue_cancel(ds4_dist_worker_job_queue *q) { |
| 7687 | pthread_mutex_lock(&q->mu); |
| 7688 | q->closed = true; |
| 7689 | q->canceled = true; |
| 7690 | dist_worker_job_queue_clear_locked(q); |
| 7691 | pthread_cond_broadcast(&q->not_empty); |
| 7692 | pthread_cond_broadcast(&q->not_full); |
| 7693 | pthread_mutex_unlock(&q->mu); |
| 7694 | } |
no outgoing calls
no test coverage detected