lkml.org 
[lkml]   [2004]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] volatile may be needed in rwsem
Date

> 'flags' should be declared volatile as rwsem_down_failed_common() spins
> waiting for this to change. Untested.

Is it though? Does this fix an error?

The thing is, we make a function call inside of the loop:

/* wait to be given the lock */
for (;;) {
if (!waiter->flags)
break;
schedule();
set_task_state(tsk, TASK_UNINTERRUPTIBLE);
}

Which might preclude that need. I'm not entirely sure, though... it's one of
those compiler black magic things.

I suppose it can't hurt...

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

\
 
 \ /
  Last update: 2005-03-22 14:00    [W:0.041 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site