[PATCH] Use definition for cmpxchg swi

Nicolas Pitre nico at fluxnic.net
Sun Nov 8 20:42:51 EST 2009


On Sun, 8 Nov 2009, Russell King - ARM Linux wrote:

> Use a definition for the cmpxchg SWI instead of hard-coding the number.

Well...  Initially I didn't use a definition in unistd.h because I 
didn't want user space to "see" it and assume this was part of the 
kernel ABI since this is actually just an implementation detail that 
depends on a particular kernel configuration.  If you want to define it 
with this patch then I'd suggest copying the related comment from 
traps.c near the definition as well:

         * *NOTE*: This is a ghost syscall private to the kernel.  Only the
         * __kuser_cmpxchg code in entry-armv.S should be aware of its
         * existence.  Don't ever use this from user code.


Nicolas



More information about the linux-arm-kernel mailing list