File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -199,9 +199,10 @@ struct dispatch_root_queue_context_s {
199
199
};
200
200
typedef struct dispatch_root_queue_context_s * dispatch_root_queue_context_t ;
201
201
202
+ #define WORKQ_PRIO_INVALID (-1)
202
203
#ifdef __linux__
203
- #define WORKQ_BG_PRIOQUEUE_CONDITIONAL (-1)
204
- #define WORKQ_HIGH_PRIOQUEUE_CONDITIONAL (-1)
204
+ #define WORKQ_BG_PRIOQUEUE_CONDITIONAL WORKQ_PRIO_INVALID
205
+ #define WORKQ_HIGH_PRIOQUEUE_CONDITIONAL WORKQ_PRIO_INVALID
205
206
#else
206
207
#define WORKQ_BG_PRIOQUEUE_CONDITIONAL WORKQ_BG_PRIOQUEUE
207
208
#define WORKQ_HIGH_PRIOQUEUE_CONDITIONAL WORKQ_HIGH_PRIOQUEUE
@@ -817,8 +818,7 @@ _dispatch_root_queues_init_workq(void)
817
818
pthread_workqueue_t pwq = NULL ;
818
819
dispatch_root_queue_context_t qc ;
819
820
qc = & _dispatch_root_queue_contexts [i ];
820
- #if DISPATCH_USE_LEGACY_WORKQUEUE_FALLBACK
821
- if (!disable_wq && qc -> dgq_wq_priority != -1 ) {
821
+ if (!disable_wq && qc -> dgq_wq_priority != WORKQ_PRIO_INVALID ) {
822
822
r = pthread_workqueue_attr_setqueuepriority_np (& pwq_attr ,
823
823
qc -> dgq_wq_priority );
824
824
(void )dispatch_assume_zero (r );
Original file line number Diff line number Diff line change @@ -740,6 +740,7 @@ _dispatch_thread_semaphore_dispose(_dispatch_thread_semaphore_t sema)
740
740
#elif USE_POSIX_SEM
741
741
sem_t * s4 = (sem_t * )sema ;
742
742
int ret = sem_destroy (s4 );
743
+ free (s4 );
743
744
DISPATCH_SEMAPHORE_VERIFY_RET (ret );
744
745
#elif USE_WIN32_SEM
745
746
// XXX: signal the semaphore?
You can’t perform that action at this time.
0 commit comments