[Xenomai-git] Philippe Gerum : cobalt/posix: convert 32bit syscalls to long return type

2015-03-24 Thread git repository hosting
Module: xenomai-3
Branch: master
Commit: 3f243033c2e44778dc403fa1540c2d9d70f6cf2a
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=3f243033c2e44778dc403fa1540c2d9d70f6cf2a

Author: Philippe Gerum 
Date:   Tue Feb 17 12:16:22 2015 +0100

cobalt/posix: convert 32bit syscalls to long return type

---

 .../arch/x86/include/asm/xenomai/syscall32.h   |   20 +-
 kernel/cobalt/posix/syscall32.c|  195 ++-
 kernel/cobalt/posix/syscall32.h|  200 ++--
 3 files changed, 207 insertions(+), 208 deletions(-)

diff --git a/kernel/cobalt/arch/x86/include/asm/xenomai/syscall32.h 
b/kernel/cobalt/arch/x86/include/asm/xenomai/syscall32.h
index 5604580..8bd40d4 100644
--- a/kernel/cobalt/arch/x86/include/asm/xenomai/syscall32.h
+++ b/kernel/cobalt/arch/x86/include/asm/xenomai/syscall32.h
@@ -62,12 +62,12 @@
__COBALT_CALL32x_ENTRY(__name, __syshand32emu__(__name))
 
 /* x32 thunk implementation. */
-#define COBALT_SYSCALL32x(__name, __mode, __type, __args)  \
-   __typeof__(__type) cobalt32x_ ## __name __args
+#define COBALT_SYSCALL32x(__name, __mode, __args)  \
+   long cobalt32x_ ## __name __args
 
 /* x32 thunk declaration. */
-#define COBALT_SYSCALL32x_DECL(__name, __type, __args) \
-   __typeof__(__type) cobalt32x_ ## __name __args
+#define COBALT_SYSCALL32x_DECL(__name, __args) \
+   long cobalt32x_ ## __name __args
 
 #else /* !CONFIG_X86_X32 */
 
@@ -87,7 +87,7 @@
 
 #define __COBALT_CALL32x_THUNK(__name)
 
-#define COBALT_SYSCALL32x_DECL(__name, __type, __args)
+#define COBALT_SYSCALL32x_DECL(__name, __args)
 
 #endif /* !CONFIG_X86_X32 */
 
@@ -127,12 +127,12 @@
__COBALT_CALL32emu_ENTRY(__name, __syshand32emu__(__name))
 
 /* ia32 thunk implementation. */
-#define COBALT_SYSCALL32emu(__name, __mode, __type, __args)\
-   __typeof__(__type) cobalt32emu_ ## __name __args
+#define COBALT_SYSCALL32emu(__name, __mode, __args)\
+   long cobalt32emu_ ## __name __args
 
 /* ia32 thunk declaration. */
-#define COBALT_SYSCALL32emu_DECL(__name, __type, __args)   \
-   __typeof__(__type) cobalt32emu_ ## __name __args
+#define COBALT_SYSCALL32emu_DECL(__name, __args)   \
+   long cobalt32emu_ ## __name __args
 
 #else /* !CONFIG_IA32_EMULATION */
 
@@ -150,7 +150,7 @@
 
 #define __COBALT_CALL32emu_THUNK(__name)
 
-#define COBALT_SYSCALL32emu_DECL(__name, __type, __args)
+#define COBALT_SYSCALL32emu_DECL(__name, __args)
 
 #endif /* !CONFIG_IA32_EMULATION */
 
diff --git a/kernel/cobalt/posix/syscall32.c b/kernel/cobalt/posix/syscall32.c
index 17066bc..218bc7b 100644
--- a/kernel/cobalt/posix/syscall32.c
+++ b/kernel/cobalt/posix/syscall32.c
@@ -37,11 +37,11 @@
 #include "../debug.h"
 
 COBALT_SYSCALL32emu(thread_create, init,
-   int, (compat_ulong_t pth,
- int policy,
- const struct compat_sched_param_ex __user *u_param_ex,
- int xid,
- __u32 __user *u_winoff))
+   (compat_ulong_t pth,
+int policy,
+const struct compat_sched_param_ex __user *u_param_ex,
+int xid,
+__u32 __user *u_winoff))
 {
struct sched_param_ex param_ex;
int ret;
@@ -54,11 +54,11 @@ COBALT_SYSCALL32emu(thread_create, init,
 }
 
 COBALT_SYSCALL32emu(thread_setschedparam_ex, conforming,
-   int, (compat_ulong_t pth,
- int policy,
- const struct compat_sched_param_ex __user *u_param_ex,
- __u32 __user *u_winoff,
- int __user *u_promoted))
+   (compat_ulong_t pth,
+int policy,
+const struct compat_sched_param_ex __user *u_param_ex,
+__u32 __user *u_winoff,
+int __user *u_promoted))
 {
struct sched_param_ex param_ex;
int ret;
@@ -72,9 +72,9 @@ COBALT_SYSCALL32emu(thread_setschedparam_ex, conforming,
 }
 
 COBALT_SYSCALL32emu(thread_getschedparam_ex, current,
-   int, (compat_ulong_t pth,
- int __user *u_policy,
- struct compat_sched_param_ex __user *u_param))
+   (compat_ulong_t pth,
+int __user *u_policy,
+struct compat_sched_param_ex __user *u_param))
 {
struct sched_param_ex param_ex;
int policy;
@@ -94,9 +94,9 @@ static inline int sys32_fetch_timeout(struct timespec *ts,
 }
 
 COBALT_SYSCALL32emu(sem_open, lostage,
-   int, (compat_uptr_t __user *u_addrp,
- const char __user *u_name,
- int oflags, mode_t mode, unsigned int value))
+   (compat_uptr_t __user *u_addrp,
+const char __user *u_name,
+int oflags, mode_t mod

[Xenomai-git] Philippe Gerum : cobalt/posix: convert 32bit syscalls to long return type

2015-02-17 Thread git repository hosting
Module: xenomai-3
Branch: next
Commit: 3f243033c2e44778dc403fa1540c2d9d70f6cf2a
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=3f243033c2e44778dc403fa1540c2d9d70f6cf2a

Author: Philippe Gerum 
Date:   Tue Feb 17 12:16:22 2015 +0100

cobalt/posix: convert 32bit syscalls to long return type

---

 .../arch/x86/include/asm/xenomai/syscall32.h   |   20 +-
 kernel/cobalt/posix/syscall32.c|  195 ++-
 kernel/cobalt/posix/syscall32.h|  200 ++--
 3 files changed, 207 insertions(+), 208 deletions(-)

diff --git a/kernel/cobalt/arch/x86/include/asm/xenomai/syscall32.h 
b/kernel/cobalt/arch/x86/include/asm/xenomai/syscall32.h
index 5604580..8bd40d4 100644
--- a/kernel/cobalt/arch/x86/include/asm/xenomai/syscall32.h
+++ b/kernel/cobalt/arch/x86/include/asm/xenomai/syscall32.h
@@ -62,12 +62,12 @@
__COBALT_CALL32x_ENTRY(__name, __syshand32emu__(__name))
 
 /* x32 thunk implementation. */
-#define COBALT_SYSCALL32x(__name, __mode, __type, __args)  \
-   __typeof__(__type) cobalt32x_ ## __name __args
+#define COBALT_SYSCALL32x(__name, __mode, __args)  \
+   long cobalt32x_ ## __name __args
 
 /* x32 thunk declaration. */
-#define COBALT_SYSCALL32x_DECL(__name, __type, __args) \
-   __typeof__(__type) cobalt32x_ ## __name __args
+#define COBALT_SYSCALL32x_DECL(__name, __args) \
+   long cobalt32x_ ## __name __args
 
 #else /* !CONFIG_X86_X32 */
 
@@ -87,7 +87,7 @@
 
 #define __COBALT_CALL32x_THUNK(__name)
 
-#define COBALT_SYSCALL32x_DECL(__name, __type, __args)
+#define COBALT_SYSCALL32x_DECL(__name, __args)
 
 #endif /* !CONFIG_X86_X32 */
 
@@ -127,12 +127,12 @@
__COBALT_CALL32emu_ENTRY(__name, __syshand32emu__(__name))
 
 /* ia32 thunk implementation. */
-#define COBALT_SYSCALL32emu(__name, __mode, __type, __args)\
-   __typeof__(__type) cobalt32emu_ ## __name __args
+#define COBALT_SYSCALL32emu(__name, __mode, __args)\
+   long cobalt32emu_ ## __name __args
 
 /* ia32 thunk declaration. */
-#define COBALT_SYSCALL32emu_DECL(__name, __type, __args)   \
-   __typeof__(__type) cobalt32emu_ ## __name __args
+#define COBALT_SYSCALL32emu_DECL(__name, __args)   \
+   long cobalt32emu_ ## __name __args
 
 #else /* !CONFIG_IA32_EMULATION */
 
@@ -150,7 +150,7 @@
 
 #define __COBALT_CALL32emu_THUNK(__name)
 
-#define COBALT_SYSCALL32emu_DECL(__name, __type, __args)
+#define COBALT_SYSCALL32emu_DECL(__name, __args)
 
 #endif /* !CONFIG_IA32_EMULATION */
 
diff --git a/kernel/cobalt/posix/syscall32.c b/kernel/cobalt/posix/syscall32.c
index 17066bc..218bc7b 100644
--- a/kernel/cobalt/posix/syscall32.c
+++ b/kernel/cobalt/posix/syscall32.c
@@ -37,11 +37,11 @@
 #include "../debug.h"
 
 COBALT_SYSCALL32emu(thread_create, init,
-   int, (compat_ulong_t pth,
- int policy,
- const struct compat_sched_param_ex __user *u_param_ex,
- int xid,
- __u32 __user *u_winoff))
+   (compat_ulong_t pth,
+int policy,
+const struct compat_sched_param_ex __user *u_param_ex,
+int xid,
+__u32 __user *u_winoff))
 {
struct sched_param_ex param_ex;
int ret;
@@ -54,11 +54,11 @@ COBALT_SYSCALL32emu(thread_create, init,
 }
 
 COBALT_SYSCALL32emu(thread_setschedparam_ex, conforming,
-   int, (compat_ulong_t pth,
- int policy,
- const struct compat_sched_param_ex __user *u_param_ex,
- __u32 __user *u_winoff,
- int __user *u_promoted))
+   (compat_ulong_t pth,
+int policy,
+const struct compat_sched_param_ex __user *u_param_ex,
+__u32 __user *u_winoff,
+int __user *u_promoted))
 {
struct sched_param_ex param_ex;
int ret;
@@ -72,9 +72,9 @@ COBALT_SYSCALL32emu(thread_setschedparam_ex, conforming,
 }
 
 COBALT_SYSCALL32emu(thread_getschedparam_ex, current,
-   int, (compat_ulong_t pth,
- int __user *u_policy,
- struct compat_sched_param_ex __user *u_param))
+   (compat_ulong_t pth,
+int __user *u_policy,
+struct compat_sched_param_ex __user *u_param))
 {
struct sched_param_ex param_ex;
int policy;
@@ -94,9 +94,9 @@ static inline int sys32_fetch_timeout(struct timespec *ts,
 }
 
 COBALT_SYSCALL32emu(sem_open, lostage,
-   int, (compat_uptr_t __user *u_addrp,
- const char __user *u_name,
- int oflags, mode_t mode, unsigned int value))
+   (compat_uptr_t __user *u_addrp,
+const char __user *u_name,
+int oflags, mode_t mode,