• Hirokazu Takata's avatar
    [PATCH] m32r: Make kernel headers for mutual exclusion · e51886ef
    Hirokazu Takata authored
    Here is a patch to update kernel headers for mutual exclusion,
    atomic.h, bitops.h and semaphore.h of m32r.
    This patch is for making these headers publishable to userland.
    
    	* include/asm-m32r/assembler.h (M32R_LOCK, M32R_UNLOCK):
    	  Define M32R_LOCK and M32R_UNLOCK macros. For SMP configuration,
    	  these macros are expanded to m32r's LOCK and UNLOCK instructions.
    	  While, for UP configuration, these are simply expanded to m32r's
    	  LD(load) and ST(store) instructions, respectively.
    
    	* include/asm-m32r/atomic.h, include/asm-m32r/bitops.h,
    	  include/asm-m32r/semaphore.h:
    	  - Change macros from LOAD and STORE to M32R_LOCK and M32R_UNLOCK,
    	    respectively.  It is because LOAD and STORE are too generic words.
    	  - Change inline to __inline__.
    	    Retrieve __inline__ modifiers for functions which are placed
    	    outside of __KERNEL__ region in these headers, because those
    	    functions might be included and used from ISO C program in
    	    userland.
    
    Currently, it seems that these headers are allowed to be included from
    userland.  Indeed, they are kernel stuff, but these headers provide
    useful definitions and functions even for userland applications, I think.
    Signed-off-by: default avatarHirokazu Takata <takata@linux-m32r.org>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    e51886ef
bitops.h 15.8 KB