MFC r256612: MFprojects/camlock r254685:
Remove TQ_FLAGS_PENDING flag, softly duplicating queue emptiness status.
This commit is contained in:
parent
f123f2ce18
commit
dd8690af3e
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user