lkml.org 
[lkml]   [2008]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: futex code and barriers
On Tue, 29 Apr 2008, Peter Zijlstra wrote:

> While looking through the futex code I stumbled upon the following bit:
> kernel/futex.c:
> /* add_wait_queue is the barrier after __set_current_state. */
> __set_current_state(TASK_INTERRUPTIBLE);
> add_wait_queue(&q.waiters, &wait);
> However,
> void add_wait_queue(wait_queue_head_t *q, wait_queue_t *wait)
> {
> unsigned long flags;
>
> wait->flags &= ~WQ_FLAG_EXCLUSIVE;
> spin_lock_irqsave(&q->lock, flags);
> __add_wait_queue(q, wait);
> spin_unlock_irqrestore(&q->lock, flags);
> }
[ ... ]
> Non of which implies a full barrier.

Well I am probably missing the point, but what about the lock and unlock
of the spinlock?

--
Jiri Kosina
SUSE Labs



\
 
 \ /
  Last update: 2008-04-29 15:03    [W:0.047 / U:0.860 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site