lkml.org 
[lkml]   [2002]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: cmpxchg in 2.5.38
From
   From: Ingo Molnar <mingo@elte.hu>
Date: Wed, 25 Sep 2002 10:26:34 +0200 (CEST)

yes. It's only this place in the code that ever modifies that word

I just realized... how would a crippled spinlock implementation
protect the readers looking at the word?

The operation is decidely non-atomic, because only one side
of the access is being synchronized.

This is another reason you can't use cmpxchg like this and expect
every architecture to be able to do something reasonable.

Use instead some algorithm with xchg() which is supported on every
platform.
-
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 13:29    [W:0.042 / U:2.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site