Consolidate asm/futex.h
Subsystems (3)
PATCH 4/4 Consolidate asm/futex.h
Most of the architectures have the same asm/futex.h. This consolidates them into asm-generic, with the arches including it from their own asm/futex.h.
In the case of UML, this reverts the old broken futex.h and goes back to using the same one as almost everyone else.
include/asm-alpha/futex.h +1 -48
@@ -1,53 +1,6 @@#ifndef _ASM_FUTEX_H#define _ASM_FUTEX_H -#ifdef __KERNEL__ +#include <asm-generic/futex.h> -#include <linux/futex.h> -#include <asm/errno.h> -#include <asm/uaccess.h> - -static inline int -futex_atomic_op_inuser (int encoded_op,int __user *uaddr) -{ -int op = (encoded_op >>28 ) &7 ; -int cmp = (encoded_op >>24 ) &15 ; -int oparg = (encoded_op <<8 ) >>20 ; -int cmparg = (encoded_op <<20 ) >>20 ; -int oldval =0 , ret; -if (encoded_op & (FUTEX_OP_OPARG_SHIFT <<28 )) - oparg =1 << oparg; - -if (!access_ok (VERIFY_WRITE , uaddr,sizeof (int ))) -return -EFAULT ; - -inc_preempt_count (); - -switch (op) { -case FUTEX_OP_SET : -case FUTEX_OP_ADD : -case FUTEX_OP_OR : -case FUTEX_OP_ANDN : -case FUTEX_OP_XOR : -default : - ret = -ENOSYS ; - } - -dec_preempt_count (); - -if (!ret) { -switch (cmp) { -case FUTEX_OP_CMP_EQ : ret = (oldval == cmparg);break ; -case FUTEX_OP_CMP_NE : ret = (oldval != cmparg);break ; -case FUTEX_OP_CMP_LT : ret = (oldval < cmparg);break ; -case FUTEX_OP_CMP_GE : ret = (oldval >= cmparg);break ; -case FUTEX_OP_CMP_LE : ret = (oldval <= cmparg);break ; -case FUTEX_OP_CMP_GT : ret = (oldval > cmparg);break ; -default : ret = -ENOSYS ; - } - } -return ret; -} - -#endif #endif
include/asm-arm/futex.h +1 -48
54 lines not on this page · raw message
include/asm-arm26/futex.h +1 -48
54 lines not on this page · raw message
include/asm-cris/futex.h +1 -48
54 lines not on this page · raw message
include/asm-frv/futex.h +1 -48
54 lines not on this page · raw message
include/asm-generic/futex.h new file +53 -0
53 lines not on this page · raw message
include/asm-h8300/futex.h +1 -48
54 lines not on this page · raw message
include/asm-ia64/futex.h +1 -48
54 lines not on this page · raw message
include/asm-m32r/futex.h +1 -48
54 lines not on this page · raw message
include/asm-m68k/futex.h +1 -48
54 lines not on this page · raw message
include/asm-m68knommu/futex.h +1 -48
54 lines not on this page · raw message
include/asm-parisc/futex.h +1 -48
54 lines not on this page · raw message
include/asm-s390/futex.h +1 -48
54 lines not on this page · raw message
include/asm-sh/futex.h +1 -48
54 lines not on this page · raw message
include/asm-sh64/futex.h +1 -48
54 lines not on this page · raw message
include/asm-sparc/futex.h +1 -48
54 lines not on this page · raw message
include/asm-sparc64/futex.h +1 -48
54 lines not on this page · raw message
include/asm-um/futex.h +3 -9
@@ -1,12 +1,6 @@ -#ifndef __UM_FUTEX_H -#define __UM_FUTEX_H +#ifndef _ASM_FUTEX_H +#define _ASM_FUTEX_H -#include <linux/futex.h> -#include <asm/errno.h> -#include <asm/system.h> -#include <asm/processor.h> -#include <asm/uaccess.h> - -#include "asm/arch/futex.h" +#include <asm-generic/futex.h> #endif
include/asm-v850/futex.h +1 -48
54 lines not on this page · raw message
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 7 lines · Jeff Dike
Most of the architectures have the same
asm/futex.h. This
consolidates them into asm-generic, with the arches including it from their ownasm/futex.h.In the case of UML, this reverts the old broken
futex.hand goes back to using the same one as almost everyone else.
I dropped the frv part - it's recently gone with a private version.
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel