lkml.org 
[lkml]   [2001]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] read/write semaphore trylock routines - 2.4.6
Date
From
> A caveat for these trylock routines is that they use the cmpxchg
> instruction, which limits their usefulness on x86 to 486 and above.

Given that the implementation in that asm-i386/rwsem.h is based around usage
of the XADD instruction which exists everywhere the CMPXCHG instruction does
(I believe), you don't really need to put the #if clause around it.

You should also add spinlock versions too, which will cover most other archs.

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 12:56    [W:0.053 / U:3.976 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site