lkml.org 
[lkml]   [2013]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v7 1/4] qrwlock: A queue read/write lock implementation
Date
Linus Torvalds <torvalds@linux-foundation.org> writes:
>
> In this case, we seem to want the xadd() semantics. I guess we can use
> "atomic_add_return(val,&atomic)-val" and just assume that the compiler
> gets it right (with the addition and the subtraction cancelling out).

It can't, as we use inline assembler.

In theory it could with __sync_* or __atomic_* intrinsics but we
traditionally don't use them as they don't support patchable LOCK

(maybe it would be time to get rid of the patchable LOCK though?)

-Andi

--
ak@linux.intel.com -- Speaking for myself only


\
 
 \ /
  Last update: 2013-12-18 21:01    [W:0.095 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site