Re: [2/5] consolidate bit waiting code patterns

From: William Lee Irwin III
Date: Sat Aug 28 2004 - 17:36:33 EST


William Lee Irwin III <wli@xxxxxxxxxxxxxx> wrote:
>> +void fastcall __wake_up_bit(wait_queue_head_t *wq, void *word, int bit)
>> +{
>> + struct wait_bit_key key = __WAIT_BIT_KEY_INITIALIZER(word, bit);
>> + if (waitqueue_active(wq))
>> + __wake_up(wq, TASK_INTERRUPTIBLE|TASK_UNINTERRUPTIBLE, 1, &key);
>> +}

On Sat, Aug 28, 2004 at 03:29:04PM -0700, Andrew Morton wrote:
> The waitqueue_active() test needs a preceding barrier. Did it
> come from somewhere else, implicitly?

Yes, it comes from clearing the bit prior to calling this for wakeup.


-- wli
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/