diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/subr_taskqueue.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/kern/subr_taskqueue.c b/sys/kern/subr_taskqueue.c index f104bb5..58c850b 100644 --- a/sys/kern/subr_taskqueue.c +++ b/sys/kern/subr_taskqueue.c @@ -69,7 +69,6 @@ struct taskqueue { #define TQ_FLAGS_ACTIVE (1 << 0) #define TQ_FLAGS_BLOCKED (1 << 1) -#define TQ_FLAGS_PENDING (1 << 2) #define DT_CALLOUT_ARMED (1 << 0) @@ -222,8 +221,6 @@ taskqueue_enqueue_locked(struct taskqueue *queue, struct task *task) task->ta_pending = 1; if ((queue->tq_flags & TQ_FLAGS_BLOCKED) == 0) queue->tq_enqueue(queue->tq_context); - else - queue->tq_flags |= TQ_FLAGS_PENDING; return (0); } @@ -309,10 +306,8 @@ taskqueue_unblock(struct taskqueue *queue) TQ_LOCK(queue); queue->tq_flags &= ~TQ_FLAGS_BLOCKED; - if (queue->tq_flags & TQ_FLAGS_PENDING) { - queue->tq_flags &= ~TQ_FLAGS_PENDING; + if (!STAILQ_EMPTY(&queue->tq_queue)) queue->tq_enqueue(queue->tq_context); - } TQ_UNLOCK(queue); } |