Module: xenomai-3
Branch: next
Commit: f22bfc38b5d2e2f6da7c9105695bff37876b0e66
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=f22bfc38b5d2e2f6da7c9105695bff37876b0e66

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Thu Feb 12 18:26:04 2015 +0100

cobalt/posix: Convert syscalls to long return type

Remove the return type from COBALT_SYSCALL[_DECL] and replace it with
long, the correct type we actually need to provide to the syscall
dispatchers. Convert all users of the macros. This has to be done in a
single step, thus this huge commit.

Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>

---

 kernel/cobalt/posix/clock.c   |   13 ++++++-------
 kernel/cobalt/posix/clock.h   |   15 ++++++---------
 kernel/cobalt/posix/cond.c    |   20 ++++++++++----------
 kernel/cobalt/posix/cond.h    |   20 ++++++++++----------
 kernel/cobalt/posix/event.c   |   24 ++++++++++++------------
 kernel/cobalt/posix/event.h   |   28 ++++++++++++++--------------
 kernel/cobalt/posix/io.c      |   34 ++++++++++++++++------------------
 kernel/cobalt/posix/io.h      |   30 +++++++++++++++---------------
 kernel/cobalt/posix/monitor.c |   18 +++++++++---------
 kernel/cobalt/posix/monitor.h |   20 ++++++++++----------
 kernel/cobalt/posix/mqueue.c  |   25 ++++++++++++-------------
 kernel/cobalt/posix/mqueue.h  |   26 +++++++++++---------------
 kernel/cobalt/posix/mutex.c   |   18 +++++++++---------
 kernel/cobalt/posix/mutex.h   |   18 +++++++++---------
 kernel/cobalt/posix/nsem.c    |   10 +++++-----
 kernel/cobalt/posix/sched.c   |   21 ++++++++++-----------
 kernel/cobalt/posix/sched.h   |   23 +++++++++++------------
 kernel/cobalt/posix/sem.c     |   30 +++++++++++++++---------------
 kernel/cobalt/posix/sem.h     |   38 +++++++++++++++++++-------------------
 kernel/cobalt/posix/signal.c  |   18 ++++++++----------
 kernel/cobalt/posix/signal.h  |   20 +++++++++-----------
 kernel/cobalt/posix/syscall.c |   35 +++++++++++++++++------------------
 kernel/cobalt/posix/syscall.h |    8 ++++----
 kernel/cobalt/posix/thread.c  |   37 ++++++++++++++++++-------------------
 kernel/cobalt/posix/thread.h  |   37 +++++++++++++++++--------------------
 kernel/cobalt/posix/timer.c   |   19 +++++++++----------
 kernel/cobalt/posix/timer.h   |   18 +++++++++---------
 kernel/cobalt/posix/timerfd.c |   11 +++++------
 kernel/cobalt/posix/timerfd.h |   10 +++++-----
 29 files changed, 310 insertions(+), 334 deletions(-)

diff --git a/kernel/cobalt/posix/clock.c b/kernel/cobalt/posix/clock.c
index 8c0f9c9..d0b108e 100644
--- a/kernel/cobalt/posix/clock.c
+++ b/kernel/cobalt/posix/clock.c
@@ -130,7 +130,7 @@ int __cobalt_clock_getres(clockid_t clock_id, struct 
timespec *ts)
 }
 
 COBALT_SYSCALL(clock_getres, current,
-              int, (clockid_t clock_id, struct timespec __user *u_ts))
+              (clockid_t clock_id, struct timespec __user *u_ts))
 {
        struct timespec ts;
        int ret;
@@ -177,7 +177,7 @@ int __cobalt_clock_gettime(clockid_t clock_id, struct 
timespec *ts)
 }
 
 COBALT_SYSCALL(clock_gettime, current,
-              int, (clockid_t clock_id, struct timespec __user *u_ts))
+              (clockid_t clock_id, struct timespec __user *u_ts))
 {
        struct timespec ts;
        int ret;
@@ -222,8 +222,7 @@ int __cobalt_clock_settime(clockid_t clock_id, const struct 
timespec *ts)
 }
 
 COBALT_SYSCALL(clock_settime, current,
-              int, (clockid_t clock_id,
-                    const struct timespec __user *u_ts))
+              (clockid_t clock_id, const struct timespec __user *u_ts))
 {
        struct timespec ts;
 
@@ -282,9 +281,9 @@ int __cobalt_clock_nanosleep(clockid_t clock_id, int flags,
 }
 
 COBALT_SYSCALL(clock_nanosleep, nonrestartable,
-              int, (clockid_t clock_id, int flags,
-                    const struct timespec __user *u_rqt,
-                    struct timespec __user *u_rmt))
+              (clockid_t clock_id, int flags,
+               const struct timespec __user *u_rqt,
+               struct timespec __user *u_rmt))
 {
        struct timespec rqt, rmt, *rmtp = NULL;
        int ret;
diff --git a/kernel/cobalt/posix/clock.h b/kernel/cobalt/posix/clock.h
index 5fa0f16..c810c1e 100644
--- a/kernel/cobalt/posix/clock.h
+++ b/kernel/cobalt/posix/clock.h
@@ -98,21 +98,18 @@ int __cobalt_clock_nanosleep(clockid_t clock_id, int flags,
                             struct timespec *rmt);
 
 COBALT_SYSCALL_DECL(clock_getres,
-                   int, (clockid_t clock_id,
-                         struct timespec __user *u_ts));
+                   (clockid_t clock_id, struct timespec __user *u_ts));
 
 COBALT_SYSCALL_DECL(clock_gettime,
-                   int, (clockid_t clock_id,
-                         struct timespec __user *u_ts));
+                   (clockid_t clock_id, struct timespec __user *u_ts));
 
 COBALT_SYSCALL_DECL(clock_settime,
-                   int, (clockid_t clock_id,
-                         const struct timespec __user *u_ts));
+                   (clockid_t clock_id, const struct timespec __user *u_ts));
 
 COBALT_SYSCALL_DECL(clock_nanosleep,
-                   int, (clockid_t clock_id, int flags,
-                         const struct timespec __user *u_rqt,
-                         struct timespec __user *u_rmt));
+                   (clockid_t clock_id, int flags,
+                    const struct timespec __user *u_rqt,
+                    struct timespec __user *u_rmt));
 
 int cobalt_clock_register(struct xnclock *clock,
                          clockid_t *clk_id);
diff --git a/kernel/cobalt/posix/cond.c b/kernel/cobalt/posix/cond.c
index a02800b..208501a 100644
--- a/kernel/cobalt/posix/cond.c
+++ b/kernel/cobalt/posix/cond.c
@@ -271,8 +271,8 @@ unlock_and_return:
 }
 
 COBALT_SYSCALL(cond_init, current,
-              int, (struct cobalt_cond_shadow __user *u_cnd,
-                    const struct cobalt_condattr __user *u_attr))
+              (struct cobalt_cond_shadow __user *u_cnd,
+               const struct cobalt_condattr __user *u_attr))
 {
        struct cobalt_cond_shadow cnd;
        struct cobalt_condattr attr;
@@ -294,7 +294,7 @@ COBALT_SYSCALL(cond_init, current,
 }
 
 COBALT_SYSCALL(cond_destroy, current,
-              int, (struct cobalt_cond_shadow __user *u_cnd))
+              (struct cobalt_cond_shadow __user *u_cnd))
 {
        struct cobalt_cond_shadow cnd;
        int err;
@@ -390,19 +390,19 @@ int __cobalt_cond_wait_prologue(struct cobalt_cond_shadow 
__user *u_cnd,
 
 /* pthread_cond_wait_prologue(cond, mutex, count_ptr, timed, timeout) */
 COBALT_SYSCALL(cond_wait_prologue, nonrestartable,
-              int, (struct cobalt_cond_shadow __user *u_cnd,
-                    struct cobalt_mutex_shadow __user *u_mx,
-                    int *u_err,
-                    unsigned int timed,
-                    struct timespec __user *u_ts))
+              (struct cobalt_cond_shadow __user *u_cnd,
+               struct cobalt_mutex_shadow __user *u_mx,
+               int *u_err,
+               unsigned int timed,
+               struct timespec __user *u_ts))
 {
        return __cobalt_cond_wait_prologue(u_cnd, u_mx, u_err, u_ts,
                                           timed ? cond_fetch_timeout : NULL);
 }
 
 COBALT_SYSCALL(cond_wait_epilogue, primary,
-              int, (struct cobalt_cond_shadow __user *u_cnd,
-                    struct cobalt_mutex_shadow __user *u_mx))
+              (struct cobalt_cond_shadow __user *u_cnd,
+               struct cobalt_mutex_shadow __user *u_mx))
 {
        struct xnthread *cur = xnthread_current();
        struct cobalt_cond *cond;
diff --git a/kernel/cobalt/posix/cond.h b/kernel/cobalt/posix/cond.h
index 989b235..7bd8138 100644
--- a/kernel/cobalt/posix/cond.h
+++ b/kernel/cobalt/posix/cond.h
@@ -49,22 +49,22 @@ int __cobalt_cond_wait_prologue(struct cobalt_cond_shadow 
__user *u_cnd,
                                int (*fetch_timeout)(struct timespec *ts,
                                                     const void __user *u_ts));
 COBALT_SYSCALL_DECL(cond_init,
-                   int, (struct cobalt_cond_shadow __user *u_cnd,
-                         const struct cobalt_condattr __user *u_attr));
+                   (struct cobalt_cond_shadow __user *u_cnd,
+                    const struct cobalt_condattr __user *u_attr));
 
 COBALT_SYSCALL_DECL(cond_destroy,
-                   int, (struct cobalt_cond_shadow __user *u_cnd));
+                   (struct cobalt_cond_shadow __user *u_cnd));
 
 COBALT_SYSCALL_DECL(cond_wait_prologue,
-                   int, (struct cobalt_cond_shadow __user *u_cnd,
-                         struct cobalt_mutex_shadow __user *u_mx,
-                         int *u_err,
-                         unsigned int timed,
-                         struct timespec __user *u_ts));
+                   (struct cobalt_cond_shadow __user *u_cnd,
+                    struct cobalt_mutex_shadow __user *u_mx,
+                    int *u_err,
+                    unsigned int timed,
+                    struct timespec __user *u_ts));
 
 COBALT_SYSCALL_DECL(cond_wait_epilogue,
-                   int, (struct cobalt_cond_shadow __user *u_cnd,
-                         struct cobalt_mutex_shadow __user *u_mx));
+                   (struct cobalt_cond_shadow __user *u_cnd,
+                    struct cobalt_mutex_shadow __user *u_mx));
 
 int cobalt_cond_deferred_signals(struct cobalt_cond *cond);
 
diff --git a/kernel/cobalt/posix/event.c b/kernel/cobalt/posix/event.c
index b0ec72f..372e253 100644
--- a/kernel/cobalt/posix/event.c
+++ b/kernel/cobalt/posix/event.c
@@ -47,8 +47,8 @@ struct event_wait_context {
 };
 
 COBALT_SYSCALL(event_init, current,
-              int, (struct cobalt_event_shadow __user *u_event,
-                    unsigned int value, int flags))
+              (struct cobalt_event_shadow __user *u_event,
+               unsigned int value, int flags))
 {
        struct cobalt_event_shadow shadow;
        struct cobalt_event_state *state;
@@ -191,10 +191,10 @@ out:
 }
 
 COBALT_SYSCALL(event_wait, primary,
-              int, (struct cobalt_event_shadow __user *u_event,
-                    unsigned int bits,
-                    unsigned int __user *u_bits_r,
-                    int mode, const struct timespec __user *u_ts))
+              (struct cobalt_event_shadow __user *u_event,
+               unsigned int bits,
+               unsigned int __user *u_bits_r,
+               int mode, const struct timespec __user *u_ts))
 {
        struct timespec ts, *tsp = NULL;
        int ret;
@@ -210,7 +210,7 @@ COBALT_SYSCALL(event_wait, primary,
 }
 
 COBALT_SYSCALL(event_sync, current,
-              int, (struct cobalt_event_shadow __user *u_event))
+              (struct cobalt_event_shadow __user *u_event))
 {
        unsigned int bits, waitval, testval;
        struct xnthread_wait_context *wc;
@@ -280,7 +280,7 @@ static void event_destroy(struct cobalt_event *event,
 }
 
 COBALT_SYSCALL(event_destroy, current,
-              int, (struct cobalt_event_shadow __user *u_event))
+              (struct cobalt_event_shadow __user *u_event))
 {
        struct cobalt_event *event;
        xnhandle_t handle;
@@ -309,10 +309,10 @@ out:
 }
 
 COBALT_SYSCALL(event_inquire, current,
-              int, (struct cobalt_event_shadow __user *u_event,
-                    struct cobalt_event_info __user *u_info,
-                    pid_t __user *u_waitlist,
-                    size_t waitsz))
+              (struct cobalt_event_shadow __user *u_event,
+               struct cobalt_event_info __user *u_info,
+               pid_t __user *u_waitlist,
+               size_t waitsz))
 {
        int nrpend = 0, nrwait = 0, nrpids, ret = 0;
        unsigned long pstamp, nstamp = 0;
diff --git a/kernel/cobalt/posix/event.h b/kernel/cobalt/posix/event.h
index 5dc7d1e..f22130a 100644
--- a/kernel/cobalt/posix/event.h
+++ b/kernel/cobalt/posix/event.h
@@ -42,28 +42,28 @@ int __cobalt_event_wait(struct cobalt_event_shadow __user 
*u_event,
                        int mode, const struct timespec *ts);
 
 COBALT_SYSCALL_DECL(event_init,
-                   int, (struct cobalt_event_shadow __user *u_evtsh,
-                         unsigned int value,
-                         int flags));
+                   (struct cobalt_event_shadow __user *u_evtsh,
+                    unsigned int value,
+                    int flags));
 
 COBALT_SYSCALL_DECL(event_wait,
-                   int, (struct cobalt_event_shadow __user *u_evtsh,
-                         unsigned int bits,
-                         unsigned int __user *u_bits_r,
-                         int mode,
-                         const struct timespec __user *u_ts));
+                   (struct cobalt_event_shadow __user *u_evtsh,
+                    unsigned int bits,
+                    unsigned int __user *u_bits_r,
+                    int mode,
+                    const struct timespec __user *u_ts));
 
 COBALT_SYSCALL_DECL(event_sync,
-                   int, (struct cobalt_event_shadow __user *u_evtsh));
+                   (struct cobalt_event_shadow __user *u_evtsh));
 
 COBALT_SYSCALL_DECL(event_destroy,
-                   int, (struct cobalt_event_shadow __user *u_evtsh));
+                   (struct cobalt_event_shadow __user *u_evtsh));
 
 COBALT_SYSCALL_DECL(event_inquire,
-                   int, (struct cobalt_event_shadow __user *u_event,
-                         struct cobalt_event_info __user *u_info,
-                         pid_t __user *u_waitlist,
-                         size_t waitsz));
+                   (struct cobalt_event_shadow __user *u_event,
+                    struct cobalt_event_info __user *u_info,
+                    pid_t __user *u_waitlist,
+                    size_t waitsz));
 
 void cobalt_eventq_cleanup(struct cobalt_kqueues *q);
 
diff --git a/kernel/cobalt/posix/io.c b/kernel/cobalt/posix/io.c
index 75c71fb..213b4f4 100644
--- a/kernel/cobalt/posix/io.c
+++ b/kernel/cobalt/posix/io.c
@@ -27,7 +27,7 @@
 #include "io.h"
 
 COBALT_SYSCALL(open, lostage,
-              int, (const char __user *u_path, int oflag))
+              (const char __user *u_path, int oflag))
 {
        struct filename *filename;
        int ufd;
@@ -43,43 +43,41 @@ COBALT_SYSCALL(open, lostage,
 }
 
 COBALT_SYSCALL(socket, lostage,
-              int, (int protocol_family,
-                    int socket_type, int protocol))
+              (int protocol_family, int socket_type, int protocol))
 {
        return __rtdm_dev_socket(protocol_family, socket_type, protocol);
 }
 
-COBALT_SYSCALL(close, lostage, int, (int fd))
+COBALT_SYSCALL(close, lostage, (int fd))
 {
        return rtdm_fd_close(fd, 0);
 }
 
-COBALT_SYSCALL(fcntl, current,
-       int, (int fd, int cmd, int arg))
+COBALT_SYSCALL(fcntl, current, (int fd, int cmd, int arg))
 {
        return rtdm_fd_fcntl(fd, cmd, arg);
 }
 
 COBALT_SYSCALL(ioctl, probing,
-              int, (int fd, unsigned int request, void __user *arg))
+              (int fd, unsigned int request, void __user *arg))
 {
        return rtdm_fd_ioctl(fd, request, arg);
 }
 
 COBALT_SYSCALL(read, probing,
-              ssize_t, (int fd, void __user *buf, size_t size))
+              (int fd, void __user *buf, size_t size))
 {
        return rtdm_fd_read(fd, buf, size);
 }
 
 COBALT_SYSCALL(write, probing,
-              ssize_t, (int fd, const void __user *buf, size_t size))
+              (int fd, const void __user *buf, size_t size))
 {
        return rtdm_fd_write(fd, buf, size);
 }
 
 COBALT_SYSCALL(recvmsg, probing,
-              ssize_t, (int fd, struct msghdr __user *umsg, int flags))
+              (int fd, struct msghdr __user *umsg, int flags))
 {
        struct msghdr m;
        ssize_t ret;
@@ -96,7 +94,7 @@ COBALT_SYSCALL(recvmsg, probing,
 }
 
 COBALT_SYSCALL(sendmsg, probing,
-              ssize_t, (int fd, struct msghdr __user *umsg, int flags))
+              (int fd, struct msghdr __user *umsg, int flags))
 {
        struct msghdr m;
        int ret;
@@ -107,8 +105,8 @@ COBALT_SYSCALL(sendmsg, probing,
 }
 
 COBALT_SYSCALL(mmap, lostage,
-              int, (int fd, struct _rtdm_mmap_request __user *u_rma,
-                    void __user **u_addrp))
+              (int fd, struct _rtdm_mmap_request __user *u_rma,
+               void __user **u_addrp))
 {
        struct _rtdm_mmap_request rma;
        void *u_addr = NULL;
@@ -173,11 +171,11 @@ int __cobalt_select_bind_all(struct xnselector *selector,
 
 /* int select(int, fd_set *, fd_set *, fd_set *, struct timeval *) */
 COBALT_SYSCALL(select, nonrestartable,
-              int, (int nfds,
-                    fd_set __user *u_rfds,
-                    fd_set __user *u_wfds,
-                    fd_set __user *u_xfds,
-                    struct timeval __user *u_tv))
+              (int nfds,
+               fd_set __user *u_rfds,
+               fd_set __user *u_wfds,
+               fd_set __user *u_xfds,
+               struct timeval __user *u_tv))
 {
        fd_set __user *ufd_sets[XNSELECT_MAX_TYPES] = {
                [XNSELECT_READ] = u_rfds,
diff --git a/kernel/cobalt/posix/io.h b/kernel/cobalt/posix/io.h
index 2b49546..3189acf 100644
--- a/kernel/cobalt/posix/io.h
+++ b/kernel/cobalt/posix/io.h
@@ -28,41 +28,41 @@ int __cobalt_first_fd_valid_p(fd_set 
*fds[XNSELECT_MAX_TYPES], int nfds);
 int __cobalt_select_bind_all(struct xnselector *selector,
                             fd_set *fds[XNSELECT_MAX_TYPES], int nfds);
 
-COBALT_SYSCALL_DECL(open, int,
+COBALT_SYSCALL_DECL(open,
                    (const char __user *u_path, int oflag));
 
-COBALT_SYSCALL_DECL(socket, int,
+COBALT_SYSCALL_DECL(socket,
                    (int protocol_family,
                     int socket_type, int protocol));
 
-COBALT_SYSCALL_DECL(close, int, (int fd));
+COBALT_SYSCALL_DECL(close, (int fd));
 
-COBALT_SYSCALL_DECL(fcntl, int, (int fd, int cmd, int arg));
+COBALT_SYSCALL_DECL(fcntl, (int fd, int cmd, int arg));
 
-COBALT_SYSCALL_DECL(ioctl, int,
+COBALT_SYSCALL_DECL(ioctl,
                    (int fd, unsigned int request, void __user *arg));
 
-COBALT_SYSCALL_DECL(read, ssize_t,
+COBALT_SYSCALL_DECL(read,
                    (int fd, void __user *buf, size_t size));
 
-COBALT_SYSCALL_DECL(write, ssize_t,
+COBALT_SYSCALL_DECL(write,
                    (int fd, const void __user *buf, size_t size));
 
-COBALT_SYSCALL_DECL(recvmsg, ssize_t,
+COBALT_SYSCALL_DECL(recvmsg,
                    (int fd, struct msghdr __user *umsg, int flags));
 
-COBALT_SYSCALL_DECL(sendmsg, ssize_t,
+COBALT_SYSCALL_DECL(sendmsg,
                    (int fd, struct msghdr __user *umsg, int flags));
 
-COBALT_SYSCALL_DECL(mmap, int,
+COBALT_SYSCALL_DECL(mmap,
                    (int fd, struct _rtdm_mmap_request __user *u_rma,
                     void __user * __user *u_addrp));
 
 COBALT_SYSCALL_DECL(select,
-                   int, (int nfds,
-                         fd_set __user *u_rfds,
-                         fd_set __user *u_wfds,
-                         fd_set __user *u_xfds,
-                         struct timeval __user *u_tv));
+                   (int nfds,
+                    fd_set __user *u_rfds,
+                    fd_set __user *u_wfds,
+                    fd_set __user *u_xfds,
+                    struct timeval __user *u_tv));
 
 #endif /* !_COBALT_POSIX_IO_H */
diff --git a/kernel/cobalt/posix/monitor.c b/kernel/cobalt/posix/monitor.c
index a413a19..476050a 100644
--- a/kernel/cobalt/posix/monitor.c
+++ b/kernel/cobalt/posix/monitor.c
@@ -49,8 +49,8 @@
  * thread object.
  */
 COBALT_SYSCALL(monitor_init, current,
-              int, (struct cobalt_monitor_shadow __user *u_mon,
-                    clockid_t clk_id, int flags))
+              (struct cobalt_monitor_shadow __user *u_mon,
+               clockid_t clk_id, int flags))
 {
        struct cobalt_monitor_shadow shadow;
        struct cobalt_monitor_state *state;
@@ -148,7 +148,7 @@ static int monitor_enter(xnhandle_t handle, struct xnthread 
*curr)
 }
 
 COBALT_SYSCALL(monitor_enter, primary,
-              int, (struct cobalt_monitor_shadow __user *u_mon))
+              (struct cobalt_monitor_shadow __user *u_mon))
 {
        struct xnthread *curr = xnthread_current();
        xnhandle_t handle;
@@ -300,9 +300,9 @@ out:
 }
 
 COBALT_SYSCALL(monitor_wait, nonrestartable,
-              int, (struct cobalt_monitor_shadow __user *u_mon,
-                    int event, const struct timespec __user *u_ts,
-                    int __user *u_ret))
+              (struct cobalt_monitor_shadow __user *u_mon,
+              int event, const struct timespec __user *u_ts,
+              int __user *u_ret))
 {
        struct timespec ts, *tsp = NULL;
        int ret;
@@ -318,7 +318,7 @@ COBALT_SYSCALL(monitor_wait, nonrestartable,
 }
 
 COBALT_SYSCALL(monitor_sync, nonrestartable,
-              int, (struct cobalt_monitor_shadow __user *u_mon))
+              (struct cobalt_monitor_shadow __user *u_mon))
 {
        struct cobalt_monitor *mon;
        struct xnthread *curr;
@@ -347,7 +347,7 @@ COBALT_SYSCALL(monitor_sync, nonrestartable,
 }
 
 COBALT_SYSCALL(monitor_exit, primary,
-              int, (struct cobalt_monitor_shadow __user *u_mon))
+              (struct cobalt_monitor_shadow __user *u_mon))
 {
        struct cobalt_monitor *mon;
        struct xnthread *curr;
@@ -397,7 +397,7 @@ static void monitor_destroy(struct cobalt_monitor *mon,
 }
 
 COBALT_SYSCALL(monitor_destroy, primary,
-              int, (struct cobalt_monitor_shadow __user *u_mon))
+              (struct cobalt_monitor_shadow __user *u_mon))
 {
        struct cobalt_monitor_state *state;
        struct cobalt_monitor *mon;
diff --git a/kernel/cobalt/posix/monitor.h b/kernel/cobalt/posix/monitor.h
index c7c3ab9..fc77084 100644
--- a/kernel/cobalt/posix/monitor.h
+++ b/kernel/cobalt/posix/monitor.h
@@ -43,26 +43,26 @@ int __cobalt_monitor_wait(struct cobalt_monitor_shadow 
__user *u_mon,
                          int __user *u_ret);
 
 COBALT_SYSCALL_DECL(monitor_init,
-                   int, (struct cobalt_monitor_shadow __user *u_monsh,
-                         clockid_t clk_id,
-                         int flags));
+                   (struct cobalt_monitor_shadow __user *u_monsh,
+                    clockid_t clk_id,
+                    int flags));
 
 COBALT_SYSCALL_DECL(monitor_enter,
-                   int, (struct cobalt_monitor_shadow __user *u_monsh));
+                   (struct cobalt_monitor_shadow __user *u_monsh));
 
 COBALT_SYSCALL_DECL(monitor_sync,
-                   int, (struct cobalt_monitor_shadow __user *u_monsh));
+                   (struct cobalt_monitor_shadow __user *u_monsh));
 
 COBALT_SYSCALL_DECL(monitor_exit,
-                   int, (struct cobalt_monitor_shadow __user *u_monsh));
+                   (struct cobalt_monitor_shadow __user *u_monsh));
 
 COBALT_SYSCALL_DECL(monitor_wait,
-                   int, (struct cobalt_monitor_shadow __user *u_monsh,
-                         int event, const struct timespec __user *u_ts,
-                         int __user *u_ret));
+                   (struct cobalt_monitor_shadow __user *u_monsh,
+                    int event, const struct timespec __user *u_ts,
+                    int __user *u_ret));
 
 COBALT_SYSCALL_DECL(monitor_destroy,
-                   int, (struct cobalt_monitor_shadow __user *u_monsh));
+                   (struct cobalt_monitor_shadow __user *u_monsh));
 
 void cobalt_monitorq_cleanup(struct cobalt_kqueues *q);
 
diff --git a/kernel/cobalt/posix/mqueue.c b/kernel/cobalt/posix/mqueue.c
index b922d5c..53c7e95 100644
--- a/kernel/cobalt/posix/mqueue.c
+++ b/kernel/cobalt/posix/mqueue.c
@@ -763,7 +763,7 @@ int __cobalt_mq_notify(mqd_t fd, const struct sigevent *evp)
 }
 
 COBALT_SYSCALL(mq_notify, primary,
-              int, (mqd_t fd, const struct sigevent *__user evp))
+              (mqd_t fd, const struct sigevent *__user evp))
 {
        struct sigevent sev;
 
@@ -807,8 +807,8 @@ int __cobalt_mq_open(const char __user *u_name, int oflags,
 }
 
 COBALT_SYSCALL(mq_open, lostage,
-              int, (const char __user *u_name, int oflags,
-                    mode_t mode, struct mq_attr __user *u_attr))
+              (const char __user *u_name, int oflags,
+               mode_t mode, struct mq_attr __user *u_attr))
 {
        struct mq_attr _attr, *attr = &_attr;
 
@@ -821,15 +821,14 @@ COBALT_SYSCALL(mq_open, lostage,
        return __cobalt_mq_open(u_name, oflags, mode, attr);
 }
 
-COBALT_SYSCALL(mq_close, lostage, int, (mqd_t uqd))
+COBALT_SYSCALL(mq_close, lostage, (mqd_t uqd))
 {
        trace_cobalt_mq_close(uqd);
 
        return mq_close(uqd);
 }
 
-COBALT_SYSCALL(mq_unlink, lostage,
-              int, (const char __user *u_name))
+COBALT_SYSCALL(mq_unlink, lostage, (const char __user *u_name))
 {
        char name[COBALT_MAXNAME];
        unsigned len;
@@ -865,7 +864,7 @@ int __cobalt_mq_getattr(mqd_t uqd, struct mq_attr *attr)
 }
 
 COBALT_SYSCALL(mq_getattr, current,
-              int, (mqd_t uqd, struct mq_attr __user *u_attr))
+              (mqd_t uqd, struct mq_attr __user *u_attr))
 {
        struct mq_attr attr;
        int ret;
@@ -929,8 +928,8 @@ out:
 }
 
 COBALT_SYSCALL(mq_timedsend, primary,
-              int, (mqd_t uqd, const void __user *u_buf, size_t len,
-                    unsigned int prio, const struct timespec __user *u_ts))
+              (mqd_t uqd, const void __user *u_buf, size_t len,
+               unsigned int prio, const struct timespec __user *u_ts))
 {
        return __cobalt_mq_timedsend(uqd, u_buf, len, prio,
                                     u_ts, u_ts ? mq_fetch_timeout : NULL);
@@ -988,10 +987,10 @@ fail:
 }
 
 COBALT_SYSCALL(mq_timedreceive, primary,
-              int, (mqd_t uqd, void __user *u_buf,
-                    ssize_t __user *u_len,
-                    unsigned int __user *u_prio,
-                    const struct timespec __user *u_ts))
+              (mqd_t uqd, void __user *u_buf,
+               ssize_t __user *u_len,
+               unsigned int __user *u_prio,
+               const struct timespec __user *u_ts))
 {
        ssize_t len;
        int ret;
diff --git a/kernel/cobalt/posix/mqueue.h b/kernel/cobalt/posix/mqueue.h
index 43c862f..2af5660 100644
--- a/kernel/cobalt/posix/mqueue.h
+++ b/kernel/cobalt/posix/mqueue.h
@@ -50,30 +50,26 @@ int __cobalt_mq_timedreceive(mqd_t uqd, void __user *u_buf,
 int __cobalt_mq_notify(mqd_t fd, const struct sigevent *evp);
 
 COBALT_SYSCALL_DECL(mq_open,
-                   int, (const char __user *u_name, int oflags,
-                         mode_t mode, struct mq_attr __user *u_attr));
+                   (const char __user *u_name, int oflags,
+                    mode_t mode, struct mq_attr __user *u_attr));
 
-COBALT_SYSCALL_DECL(mq_close, int, (mqd_t uqd));
+COBALT_SYSCALL_DECL(mq_close, (mqd_t uqd));
 
-COBALT_SYSCALL_DECL(mq_unlink,
-                   int, (const char __user *u_name));
+COBALT_SYSCALL_DECL(mq_unlink, (const char __user *u_name));
 
-COBALT_SYSCALL_DECL(mq_getattr, 
-                   int, (mqd_t uqd, struct mq_attr __user *u_attr));
+COBALT_SYSCALL_DECL(mq_getattr, (mqd_t uqd, struct mq_attr __user *u_attr));
 
 COBALT_SYSCALL_DECL(mq_timedsend,
-                   int, (mqd_t uqd, const void __user *u_buf, size_t len,
-                         unsigned int prio,
-                         const struct timespec __user *u_ts));
+                   (mqd_t uqd, const void __user *u_buf, size_t len,
+                    unsigned int prio, const struct timespec __user *u_ts));
 
 COBALT_SYSCALL_DECL(mq_timedreceive,
-                   int, (mqd_t uqd, void __user *u_buf,
-                        ssize_t __user *u_len,
-                        unsigned int __user *u_prio,
-                        const struct timespec __user *u_ts));
+                   (mqd_t uqd, void __user *u_buf, ssize_t __user *u_len,
+                    unsigned int __user *u_prio,
+                    const struct timespec __user *u_ts));
 
 COBALT_SYSCALL_DECL(mq_notify,
-                   int, (mqd_t fd, const struct sigevent *__user evp));
+                   (mqd_t fd, const struct sigevent *__user evp));
 
 int cobalt_mq_pkg_init(void);
 
diff --git a/kernel/cobalt/posix/mutex.c b/kernel/cobalt/posix/mutex.c
index 62b8285..80af511 100644
--- a/kernel/cobalt/posix/mutex.c
+++ b/kernel/cobalt/posix/mutex.c
@@ -228,7 +228,7 @@ out:
 }
 
 COBALT_SYSCALL(mutex_check_init, current,
-              int, (struct cobalt_mutex_shadow __user *u_mx))
+              (struct cobalt_mutex_shadow __user *u_mx))
 {
        struct cobalt_mutex *mutex;
        xnhandle_t handle;
@@ -250,8 +250,8 @@ COBALT_SYSCALL(mutex_check_init, current,
 }
 
 COBALT_SYSCALL(mutex_init, current,
-              int, (struct cobalt_mutex_shadow __user *u_mx,
-                    const struct cobalt_mutexattr __user *u_attr))
+              (struct cobalt_mutex_shadow __user *u_mx,
+               const struct cobalt_mutexattr __user *u_attr))
 {
        struct cobalt_mutex_state *state;
        struct cobalt_mutexattr attr;
@@ -287,7 +287,7 @@ COBALT_SYSCALL(mutex_init, current,
 }
 
 COBALT_SYSCALL(mutex_destroy, current,
-              int, (struct cobalt_mutex_shadow __user *u_mx))
+              (struct cobalt_mutex_shadow __user *u_mx))
 {
        struct cobalt_mutex *mutex;
        struct cobalt_mutex_shadow mx;
@@ -329,7 +329,7 @@ COBALT_SYSCALL(mutex_destroy, current,
 }
 
 COBALT_SYSCALL(mutex_trylock, primary,
-              int, (struct cobalt_mutex_shadow __user *u_mx))
+              (struct cobalt_mutex_shadow __user *u_mx))
 {
        struct xnthread *curr = xnthread_current();
        struct cobalt_mutex *mutex;
@@ -370,7 +370,7 @@ COBALT_SYSCALL(mutex_trylock, primary,
 }
 
 COBALT_SYSCALL(mutex_lock, primary,
-              int, (struct cobalt_mutex_shadow __user *u_mx))
+              (struct cobalt_mutex_shadow __user *u_mx))
 {
        return __cobalt_mutex_timedlock_break(u_mx, NULL, NULL);
 }
@@ -383,14 +383,14 @@ static inline int mutex_fetch_timeout(struct timespec *ts,
 }
 
 COBALT_SYSCALL(mutex_timedlock, primary,
-              int, (struct cobalt_mutex_shadow __user *u_mx,
-                    const struct timespec __user *u_ts))
+              (struct cobalt_mutex_shadow __user *u_mx,
+               const struct timespec __user *u_ts))
 {
        return __cobalt_mutex_timedlock_break(u_mx, u_ts, mutex_fetch_timeout);
 }
 
 COBALT_SYSCALL(mutex_unlock, nonrestartable,
-              int, (struct cobalt_mutex_shadow __user *u_mx))
+              (struct cobalt_mutex_shadow __user *u_mx))
 {
        struct cobalt_mutex *mutex;
        struct xnthread *curr;
diff --git a/kernel/cobalt/posix/mutex.h b/kernel/cobalt/posix/mutex.h
index cc623c0..343ad82 100644
--- a/kernel/cobalt/posix/mutex.h
+++ b/kernel/cobalt/posix/mutex.h
@@ -44,27 +44,27 @@ int __cobalt_mutex_acquire_unchecked(struct xnthread *cur,
                                     const struct timespec *ts);
 
 COBALT_SYSCALL_DECL(mutex_check_init,
-                   int, (struct cobalt_mutex_shadow __user *u_mx));
+                   (struct cobalt_mutex_shadow __user *u_mx));
 
 COBALT_SYSCALL_DECL(mutex_init,
-                   int, (struct cobalt_mutex_shadow __user *u_mx,
-                         const struct cobalt_mutexattr __user *u_attr));
+                   (struct cobalt_mutex_shadow __user *u_mx,
+                    const struct cobalt_mutexattr __user *u_attr));
 
 COBALT_SYSCALL_DECL(mutex_destroy,
-                   int, (struct cobalt_mutex_shadow __user *u_mx));
+                   (struct cobalt_mutex_shadow __user *u_mx));
 
 COBALT_SYSCALL_DECL(mutex_trylock,
-                   int, (struct cobalt_mutex_shadow __user *u_mx));
+                   (struct cobalt_mutex_shadow __user *u_mx));
 
 COBALT_SYSCALL_DECL(mutex_lock,
-                   int, (struct cobalt_mutex_shadow __user *u_mx));
+                   (struct cobalt_mutex_shadow __user *u_mx));
 
 COBALT_SYSCALL_DECL(mutex_timedlock,
-                   int, (struct cobalt_mutex_shadow __user *u_mx,
-                         const struct timespec __user *u_ts));
+                   (struct cobalt_mutex_shadow __user *u_mx,
+                    const struct timespec __user *u_ts));
 
 COBALT_SYSCALL_DECL(mutex_unlock,
-                   int, (struct cobalt_mutex_shadow __user *u_mx));
+                   (struct cobalt_mutex_shadow __user *u_mx));
 
 int cobalt_mutex_release(struct xnthread *cur,
                         struct cobalt_mutex *mutex);
diff --git a/kernel/cobalt/posix/nsem.c b/kernel/cobalt/posix/nsem.c
index e0472f7..9cbbfcd 100644
--- a/kernel/cobalt/posix/nsem.c
+++ b/kernel/cobalt/posix/nsem.c
@@ -217,9 +217,9 @@ __cobalt_sem_open(struct cobalt_sem_shadow __user *usm,
 }
 
 COBALT_SYSCALL(sem_open, lostage,
-              int, (struct cobalt_sem_shadow __user *__user *u_addrp,
-                    const char __user *u_name,
-                    int oflags, mode_t mode, unsigned int value))
+              (struct cobalt_sem_shadow __user *__user *u_addrp,
+               const char __user *u_name,
+               int oflags, mode_t mode, unsigned int value))
 {
        struct cobalt_sem_shadow __user *usm;
 
@@ -234,7 +234,7 @@ COBALT_SYSCALL(sem_open, lostage,
 }
 
 COBALT_SYSCALL(sem_close, lostage,
-              int, (struct cobalt_sem_shadow __user *usm))
+              (struct cobalt_sem_shadow __user *usm))
 {
        struct cobalt_process *cc;
        xnhandle_t handle;
@@ -267,7 +267,7 @@ static inline int sem_unlink(const char *name)
 }
 
 COBALT_SYSCALL(sem_unlink, lostage,
-              int, (const char __user *u_name))
+              (const char __user *u_name))
 {
        struct filename *filename;
        int ret;
diff --git a/kernel/cobalt/posix/sched.c b/kernel/cobalt/posix/sched.c
index 20221a4..c89f1ce 100644
--- a/kernel/cobalt/posix/sched.c
+++ b/kernel/cobalt/posix/sched.c
@@ -121,7 +121,7 @@ cobalt_sched_policy_param(union xnsched_policy_param *param,
        return sched_class;
 }
 
-COBALT_SYSCALL(sched_minprio, current, int, (int policy))
+COBALT_SYSCALL(sched_minprio, current, (int policy))
 {
        int ret;
 
@@ -149,7 +149,7 @@ COBALT_SYSCALL(sched_minprio, current, int, (int policy))
        return ret;
 }
 
-COBALT_SYSCALL(sched_maxprio, current, int, (int policy))
+COBALT_SYSCALL(sched_maxprio, current, (int policy))
 {
        int ret;
 
@@ -183,7 +183,7 @@ COBALT_SYSCALL(sched_maxprio, current, int, (int policy))
        return ret;
 }
 
-COBALT_SYSCALL(sched_yield, primary, int, (void))
+COBALT_SYSCALL(sched_yield, primary, (void))
 {
        struct cobalt_thread *curr = cobalt_current_thread();
        int ret = 0;
@@ -632,9 +632,9 @@ int __cobalt_sched_setconfig_np(int cpu, int policy,
 }
 
 COBALT_SYSCALL(sched_setconfig_np, conforming,
-              int, (int cpu, int policy,
-                    union sched_config __user *u_config,
-                    size_t len))
+              (int cpu, int policy,
+               union sched_config __user *u_config,
+               size_t len))
 {
        return __cobalt_sched_setconfig_np(cpu, policy, u_config, len,
                                           sched_fetch_config, 
sched_ack_config);
@@ -673,9 +673,9 @@ ssize_t __cobalt_sched_getconfig_np(int cpu, int policy,
 }
 
 COBALT_SYSCALL(sched_getconfig_np, conforming,
-              ssize_t, (int cpu, int policy,
-                        union sched_config __user *u_config,
-                        size_t len))
+              (int cpu, int policy,
+               union sched_config __user *u_config,
+               size_t len))
 {
        return __cobalt_sched_getconfig_np(cpu, policy, u_config, len,
                                           sched_fetch_config, 
sched_put_config);
@@ -701,8 +701,7 @@ int __cobalt_sched_weightprio(int policy,
 }
 
 COBALT_SYSCALL(sched_weightprio, current,
-              int, (int policy,
-                    const struct sched_param_ex __user *u_param))
+              (int policy, const struct sched_param_ex __user *u_param))
 {
        struct sched_param_ex param_ex;
 
diff --git a/kernel/cobalt/posix/sched.h b/kernel/cobalt/posix/sched.h
index fda94fc..40d7d56 100644
--- a/kernel/cobalt/posix/sched.h
+++ b/kernel/cobalt/posix/sched.h
@@ -61,26 +61,25 @@ cobalt_sched_policy_param(union xnsched_policy_param *param,
                          int u_policy, const struct sched_param_ex *param_ex,
                          xnticks_t *tslice_r);
 
-COBALT_SYSCALL_DECL(sched_yield, int, (void));
+COBALT_SYSCALL_DECL(sched_yield, (void));
 
 COBALT_SYSCALL_DECL(sched_weightprio,
-                   int, (int policy,
-                         const struct sched_param_ex __user *u_param));
+                   (int policy, const struct sched_param_ex __user *u_param));
 
-COBALT_SYSCALL_DECL(sched_minprio, int, (int policy));
+COBALT_SYSCALL_DECL(sched_minprio, (int policy));
 
-COBALT_SYSCALL_DECL(sched_maxprio, int, (int policy));
+COBALT_SYSCALL_DECL(sched_maxprio, (int policy));
 
 COBALT_SYSCALL_DECL(sched_setconfig_np,
-                   int, (int cpu,
-                         int policy,
-                         union sched_config __user *u_config,
-                         size_t len));
+                   (int cpu,
+                    int policy,
+                    union sched_config __user *u_config,
+                    size_t len));
 
 COBALT_SYSCALL_DECL(sched_getconfig_np,
-                   ssize_t, (int cpu, int policy,
-                             union sched_config __user *u_config,
-                             size_t len));
+                   (int cpu, int policy,
+                    union sched_config __user *u_config,
+                    size_t len));
 
 void cobalt_sched_cleanup(struct cobalt_kqueues *q);
 
diff --git a/kernel/cobalt/posix/sem.c b/kernel/cobalt/posix/sem.c
index eca42e3..7aab3a0 100644
--- a/kernel/cobalt/posix/sem.c
+++ b/kernel/cobalt/posix/sem.c
@@ -409,8 +409,8 @@ static int sem_getvalue(xnhandle_t handle, int *value)
 }
 
 COBALT_SYSCALL(sem_init, current,
-              int, (struct cobalt_sem_shadow __user *u_sem,
-                    int flags, unsigned int value))
+              (struct cobalt_sem_shadow __user *u_sem,
+               int flags, unsigned int value))
 {
        struct cobalt_sem_shadow sm;
        struct cobalt_sem *sem;
@@ -430,7 +430,7 @@ COBALT_SYSCALL(sem_init, current,
 }
 
 COBALT_SYSCALL(sem_post, current,
-              int, (struct cobalt_sem_shadow __user *u_sem))
+              (struct cobalt_sem_shadow __user *u_sem))
 {
        xnhandle_t handle;
 
@@ -441,7 +441,7 @@ COBALT_SYSCALL(sem_post, current,
 }
 
 COBALT_SYSCALL(sem_wait, primary,
-              int, (struct cobalt_sem_shadow __user *u_sem))
+              (struct cobalt_sem_shadow __user *u_sem))
 {
        xnhandle_t handle;
 
@@ -452,14 +452,14 @@ COBALT_SYSCALL(sem_wait, primary,
 }
 
 COBALT_SYSCALL(sem_timedwait, primary,
-              int, (struct cobalt_sem_shadow __user *u_sem,
-                    struct timespec __user *u_ts))
+              (struct cobalt_sem_shadow __user *u_sem,
+               struct timespec __user *u_ts))
 {
        return __cobalt_sem_timedwait(u_sem, u_ts, sem_fetch_timeout);
 }
 
 COBALT_SYSCALL(sem_trywait, primary,
-              int, (struct cobalt_sem_shadow __user *u_sem))
+              (struct cobalt_sem_shadow __user *u_sem))
 {
        xnhandle_t handle;
 
@@ -470,8 +470,8 @@ COBALT_SYSCALL(sem_trywait, primary,
 }
 
 COBALT_SYSCALL(sem_getvalue, current,
-              int, (struct cobalt_sem_shadow __user *u_sem,
-                    int __user *u_sval))
+              (struct cobalt_sem_shadow __user *u_sem,
+               int __user *u_sval))
 {
        int ret, sval = -1;
        xnhandle_t handle;
@@ -487,7 +487,7 @@ COBALT_SYSCALL(sem_getvalue, current,
 }
 
 COBALT_SYSCALL(sem_destroy, current,
-              int, (struct cobalt_sem_shadow __user *u_sem))
+              (struct cobalt_sem_shadow __user *u_sem))
 {
        struct cobalt_sem_shadow sm;
        int err;
@@ -505,7 +505,7 @@ COBALT_SYSCALL(sem_destroy, current,
 }
 
 COBALT_SYSCALL(sem_broadcast_np, current,
-              int, (struct cobalt_sem_shadow __user *u_sem))
+              (struct cobalt_sem_shadow __user *u_sem))
 {
        struct cobalt_sem *sm;
        xnhandle_t handle;
@@ -524,10 +524,10 @@ COBALT_SYSCALL(sem_broadcast_np, current,
 }
 
 COBALT_SYSCALL(sem_inquire, current,
-              int, (struct cobalt_sem_shadow __user *u_sem,
-                    struct cobalt_sem_info __user *u_info,
-                    pid_t __user *u_waitlist,
-                    size_t waitsz))
+              (struct cobalt_sem_shadow __user *u_sem,
+               struct cobalt_sem_info __user *u_info,
+               pid_t __user *u_waitlist,
+               size_t waitsz))
 {
        int val = 0, nrwait = 0, nrpids, ret = 0;
        unsigned long pstamp, nstamp = 0;
diff --git a/kernel/cobalt/posix/sem.h b/kernel/cobalt/posix/sem.h
index d050a5e..1cc6b58 100644
--- a/kernel/cobalt/posix/sem.h
+++ b/kernel/cobalt/posix/sem.h
@@ -79,47 +79,47 @@ __cobalt_sem_init(const char *name, struct 
cobalt_sem_shadow *sem,
                  int flags, unsigned value);
 
 COBALT_SYSCALL_DECL(sem_init,
-                   int, (struct cobalt_sem_shadow __user *u_sem,
-                         int flags, unsigned value));
+                   (struct cobalt_sem_shadow __user *u_sem,
+                    int flags, unsigned value));
 
 COBALT_SYSCALL_DECL(sem_post,
-                   int, (struct cobalt_sem_shadow __user *u_sem));
+                   (struct cobalt_sem_shadow __user *u_sem));
 
 COBALT_SYSCALL_DECL(sem_wait,
-                   int, (struct cobalt_sem_shadow __user *u_sem));
+                   (struct cobalt_sem_shadow __user *u_sem));
 
 COBALT_SYSCALL_DECL(sem_timedwait,
-                   int, (struct cobalt_sem_shadow __user *u_sem,
-                         struct timespec __user *u_ts));
+                   (struct cobalt_sem_shadow __user *u_sem,
+                    struct timespec __user *u_ts));
 
 COBALT_SYSCALL_DECL(sem_trywait,
-                   int, (struct cobalt_sem_shadow __user *u_sem));
+                   (struct cobalt_sem_shadow __user *u_sem));
 
-COBALT_SYSCALL_DECL(sem_getvalue, int,
+COBALT_SYSCALL_DECL(sem_getvalue,
                    (struct cobalt_sem_shadow __user *u_sem,
                     int __user *u_sval));
 
 COBALT_SYSCALL_DECL(sem_destroy,
-                   int, (struct cobalt_sem_shadow __user *u_sem));
+                   (struct cobalt_sem_shadow __user *u_sem));
 
 COBALT_SYSCALL_DECL(sem_open,
-                   int, (struct cobalt_sem_shadow __user *__user *u_addrp,
-                         const char __user *u_name,
-                         int oflags, mode_t mode, unsigned int value));
+                   (struct cobalt_sem_shadow __user *__user *u_addrp,
+                    const char __user *u_name,
+                    int oflags, mode_t mode, unsigned int value));
 
 COBALT_SYSCALL_DECL(sem_close,
-                   int, (struct cobalt_sem_shadow __user *usm));
+                   (struct cobalt_sem_shadow __user *usm));
 
-COBALT_SYSCALL_DECL(sem_unlink, int, (const char __user *u_name));
+COBALT_SYSCALL_DECL(sem_unlink, (const char __user *u_name));
 
 COBALT_SYSCALL_DECL(sem_broadcast_np,
-                   int, (struct cobalt_sem_shadow __user *u_sem));
+                   (struct cobalt_sem_shadow __user *u_sem));
 
 COBALT_SYSCALL_DECL(sem_inquire,
-                   int, (struct cobalt_sem_shadow __user *u_sem,
-                         struct cobalt_sem_info __user *u_info,
-                         pid_t __user *u_waitlist,
-                         size_t waitsz));
+                   (struct cobalt_sem_shadow __user *u_sem,
+                    struct cobalt_sem_info __user *u_info,
+                    pid_t __user *u_waitlist,
+                    size_t waitsz));
 
 void cobalt_semq_cleanup(struct cobalt_kqueues *q);
 
diff --git a/kernel/cobalt/posix/signal.c b/kernel/cobalt/posix/signal.c
index 96923be..993849d 100644
--- a/kernel/cobalt/posix/signal.c
+++ b/kernel/cobalt/posix/signal.c
@@ -376,7 +376,7 @@ int __cobalt_sigwait(sigset_t *set)
 }
 
 COBALT_SYSCALL(sigwait, primary,
-              int, (const sigset_t __user *u_set, int __user *u_sig))
+              (const sigset_t __user *u_set, int __user *u_sig))
 {
        sigset_t set;
        int sig;
@@ -414,9 +414,9 @@ int __cobalt_sigtimedwait(sigset_t *set,
 }
 
 COBALT_SYSCALL(sigtimedwait, nonrestartable,
-              int, (const sigset_t __user *u_set,
-                    struct siginfo __user *u_si,
-                    const struct timespec __user *u_timeout))
+              (const sigset_t __user *u_set,
+               struct siginfo __user *u_si,
+               const struct timespec __user *u_timeout))
 {
        struct timespec timeout;
        sigset_t set;
@@ -440,8 +440,7 @@ int __cobalt_sigwaitinfo(sigset_t *set,
 }
 
 COBALT_SYSCALL(sigwaitinfo, nonrestartable,
-              int, (const sigset_t __user *u_set,
-                    struct siginfo __user *u_si))
+              (const sigset_t __user *u_set, struct siginfo __user *u_si))
 {
        sigset_t set;
 
@@ -451,7 +450,7 @@ COBALT_SYSCALL(sigwaitinfo, nonrestartable,
        return __cobalt_sigwaitinfo(&set, u_si, signal_put_siginfo);
 }
 
-COBALT_SYSCALL(sigpending, primary, int, (old_sigset_t __user *u_set))
+COBALT_SYSCALL(sigpending, primary, (old_sigset_t __user *u_set))
 {
        struct cobalt_thread *curr = cobalt_current_thread();
 
@@ -518,7 +517,7 @@ int __cobalt_kill(struct cobalt_thread *thread, int sig, 
int group) /* nklocked,
        return ret;
 }
 
-COBALT_SYSCALL(kill, conforming, int, (pid_t pid, int sig))
+COBALT_SYSCALL(kill, conforming, (pid_t pid, int sig))
 {
        struct cobalt_thread *thread;
        int ret;
@@ -583,8 +582,7 @@ out:
 EXPORT_SYMBOL_GPL(__cobalt_sigqueue);
 
 COBALT_SYSCALL(sigqueue, conforming,
-              int, (pid_t pid, int sig,
-                    const union sigval __user *u_value))
+              (pid_t pid, int sig, const union sigval __user *u_value))
 {
        union sigval val;
        int ret;
diff --git a/kernel/cobalt/posix/signal.h b/kernel/cobalt/posix/signal.h
index 75c5a2a..63354d5 100644
--- a/kernel/cobalt/posix/signal.h
+++ b/kernel/cobalt/posix/signal.h
@@ -93,26 +93,24 @@ int __cobalt_kill(struct cobalt_thread *thread,
                  int sig, int group);
 
 COBALT_SYSCALL_DECL(sigwait,
-                   int, (const sigset_t __user *u_set,
-                         int __user *u_sig));
+                   (const sigset_t __user *u_set, int __user *u_sig));
 
 COBALT_SYSCALL_DECL(sigtimedwait,
-                   int, (const sigset_t __user *u_set,
-                         struct siginfo __user *u_si,
-                         const struct timespec __user *u_timeout));
+                   (const sigset_t __user *u_set,
+                    struct siginfo __user *u_si,
+                    const struct timespec __user *u_timeout));
 
 COBALT_SYSCALL_DECL(sigwaitinfo,
-                   int, (const sigset_t __user *u_set,
-                         struct siginfo __user *u_si));
+                   (const sigset_t __user *u_set,
+                    struct siginfo __user *u_si));
 
 COBALT_SYSCALL_DECL(sigpending,
-                   int, (old_sigset_t __user *u_set));
+                   (old_sigset_t __user *u_set));
 
-COBALT_SYSCALL_DECL(kill, int, (pid_t pid, int sig));
+COBALT_SYSCALL_DECL(kill, (pid_t pid, int sig));
 
 COBALT_SYSCALL_DECL(sigqueue,
-                   int, (pid_t pid, int sig,
-                         const union sigval __user *u_value));
+                   (pid_t pid, int sig, const union sigval __user *u_value));
 
 int cobalt_signal_pkg_init(void);
 
diff --git a/kernel/cobalt/posix/syscall.c b/kernel/cobalt/posix/syscall.c
index 6a9a02c..416e18f 100644
--- a/kernel/cobalt/posix/syscall.c
+++ b/kernel/cobalt/posix/syscall.c
@@ -73,9 +73,9 @@
 /* Shorthand for oneway trap - does not return to call site. */
 #define __xn_exec_oneway    __xn_exec_norestart
 
-typedef int (*cobalt_syshand)(unsigned long arg1, unsigned long arg2,
-                             unsigned long arg3, unsigned long arg4,
-                             unsigned long arg5);
+typedef long (*cobalt_syshand)(unsigned long arg1, unsigned long arg2,
+                              unsigned long arg3, unsigned long arg4,
+                              unsigned long arg5);
 
 static void prepare_for_signal(struct task_struct *p,
                               struct xnthread *thread,
@@ -100,7 +100,7 @@ static void prepare_for_signal(struct task_struct *p,
        xnthread_relax(notify, SIGDEBUG_MIGRATE_SIGNAL);
 }
 
-static COBALT_SYSCALL(migrate, current, int, (int domain))
+static COBALT_SYSCALL(migrate, current, (int domain))
 {
        struct xnthread *thread = xnthread_current();
 
@@ -131,8 +131,8 @@ static COBALT_SYSCALL(migrate, current, int, (int domain))
 }
 
 static COBALT_SYSCALL(trace, current,
-                     int, (int op, unsigned long a1,
-                           unsigned long a2, unsigned long a3))
+                     (int op, unsigned long a1,
+                      unsigned long a2, unsigned long a3))
 {
        int ret = -EINVAL;
 
@@ -174,15 +174,15 @@ static COBALT_SYSCALL(trace, current,
 }
 
 static COBALT_SYSCALL(archcall, current,
-                     int, (unsigned long a1, unsigned long a2,
-                           unsigned long a3, unsigned long a4,
-                           unsigned long a5))
+                     (unsigned long a1, unsigned long a2,
+                      unsigned long a3, unsigned long a4,
+                      unsigned long a5))
 {
        return xnarch_local_syscall(a1, a2, a3, a4, a5);
 }
 
 static COBALT_SYSCALL(get_current, current,
-                     int, (xnhandle_t __user *u_handle))
+                     (xnhandle_t __user *u_handle))
 {
        struct xnthread *cur = xnthread_current();
 
@@ -194,8 +194,7 @@ static COBALT_SYSCALL(get_current, current,
 }
 
 static COBALT_SYSCALL(backtrace, current,
-                     int, (int nr, unsigned long __user *u_backtrace,
-                           int reason))
+                     (int nr, unsigned long __user *u_backtrace, int reason))
 {
        unsigned long backtrace[SIGSHADOW_BACKTRACE_DEPTH];
        int ret;
@@ -227,7 +226,7 @@ static COBALT_SYSCALL(backtrace, current,
 }
 
 static COBALT_SYSCALL(serialdbg, current,
-                     int, (const char __user *u_msg, int len))
+                     (const char __user *u_msg, int len))
 {
        char buf[128];
        int n;
@@ -246,7 +245,7 @@ static COBALT_SYSCALL(serialdbg, current,
        return 0;
 }
 
-static COBALT_SYSCALL(mayday, oneway, int, (void))
+static COBALT_SYSCALL(mayday, oneway, (void))
 {
        struct pt_regs *regs = task_pt_regs(current);
        struct xnthread *cur;
@@ -295,7 +294,7 @@ static void stringify_feature_set(unsigned long fset, char 
*buf, int size)
 }
 
 static COBALT_SYSCALL(bind, lostage,
-                     int, (struct cobalt_bindreq __user *u_breq))
+                     (struct cobalt_bindreq __user *u_breq))
 {
        unsigned long featreq, featmis;
        struct cobalt_bindreq breq;
@@ -348,13 +347,13 @@ static COBALT_SYSCALL(bind, lostage,
        return cobalt_bind_core();
 }
 
-static COBALT_SYSCALL(extend, lostage, int, (unsigned int magic))
+static COBALT_SYSCALL(extend, lostage, (unsigned int magic))
 {
        return cobalt_bind_personality(magic);
 }
 
 static COBALT_SYSCALL(sysconf, current,
-                     int, (int option, void __user *u_buf, size_t u_bufsz))
+                     (int option, void __user *u_buf, size_t u_bufsz))
 {
        int ret, val = 0;
 
@@ -411,7 +410,7 @@ static COBALT_SYSCALL(sysconf, current,
 }
 
 static COBALT_SYSCALL(sysctl, probing,
-                     int, (int option, void __user *u_buf, size_t u_bufsz))
+                     (int option, void __user *u_buf, size_t u_bufsz))
 {
        return -EINVAL;
 }
diff --git a/kernel/cobalt/posix/syscall.h b/kernel/cobalt/posix/syscall.h
index 9ab686d..d2b4442 100644
--- a/kernel/cobalt/posix/syscall.h
+++ b/kernel/cobalt/posix/syscall.h
@@ -21,12 +21,12 @@
 #include <cobalt/uapi/syscall.h>
 
 /* Regular (native) syscall handler implementation. */
-#define COBALT_SYSCALL(__name, __mode, __type, __args) \
-       __typeof__(__type) cobalt_ ## __name __args
+#define COBALT_SYSCALL(__name, __mode, __args) \
+       long cobalt_ ## __name __args
 
 /* Regular (native) syscall handler declaration. */
-#define COBALT_SYSCALL_DECL(__name, __type, __args)    \
-       __typeof__(__type) cobalt_ ## __name __args
+#define COBALT_SYSCALL_DECL(__name, __args)    \
+       long cobalt_ ## __name __args
 
 #include <asm/xenomai/syscall32.h>
 
diff --git a/kernel/cobalt/posix/thread.c b/kernel/cobalt/posix/thread.c
index 7c78405..6f3f0cf 100644
--- a/kernel/cobalt/posix/thread.c
+++ b/kernel/cobalt/posix/thread.c
@@ -495,11 +495,11 @@ int __cobalt_thread_setschedparam_ex(unsigned long pth,
  * extended cobalt_thread_setschedparam_ex syscall.
  */
 COBALT_SYSCALL(thread_setschedparam_ex, conforming,
-              int, (unsigned long pth,
-                    int policy,
-                    const struct sched_param_ex __user *u_param,
-                    __u32 __user *u_winoff,
-                    int __user *u_promoted))
+              (unsigned long pth,
+               int policy,
+               const struct sched_param_ex __user *u_param,
+               __u32 __user *u_winoff,
+               int __user *u_promoted))
 {
        struct sched_param_ex param_ex;
 
@@ -542,9 +542,9 @@ int __cobalt_thread_getschedparam_ex(unsigned long pth,
  * the extended cobalt_thread_getschedparam_ex syscall.
  */
 COBALT_SYSCALL(thread_getschedparam_ex, current,
-              int, (unsigned long pth,
-                    int __user *u_policy,
-                    struct sched_param_ex __user *u_param))
+              (unsigned long pth,
+               int __user *u_policy,
+               struct sched_param_ex __user *u_param))
 {
        struct sched_param_ex param_ex;
        int policy;
@@ -605,10 +605,10 @@ fail:
 }
 
 COBALT_SYSCALL(thread_create, init,
-              int, (unsigned long pth, int policy,
-                    struct sched_param_ex __user *u_param,
-                    int xid,
-                    __u32 __user *u_winoff))
+              (unsigned long pth, int policy,
+               struct sched_param_ex __user *u_param,
+               int xid,
+               __u32 __user *u_winoff))
 {
        struct sched_param_ex param_ex;
        int ret;
@@ -658,7 +658,7 @@ fail:
 }
 
 COBALT_SYSCALL(thread_setmode, primary,
-              int, (int clrmask, int setmask, int __user *u_mode_r))
+              (int clrmask, int setmask, int __user *u_mode_r))
 {
        int ret, old;
 
@@ -675,7 +675,7 @@ COBALT_SYSCALL(thread_setmode, primary,
 }
 
 COBALT_SYSCALL(thread_setname, current,
-              int, (unsigned long pth, const char __user *u_name))
+              (unsigned long pth, const char __user *u_name))
 {
        struct cobalt_local_hkey hkey;
        struct cobalt_thread *thread;
@@ -715,7 +715,7 @@ COBALT_SYSCALL(thread_setname, current,
 }
 
 COBALT_SYSCALL(thread_kill, conforming,
-              int, (unsigned long pth, int sig))
+              (unsigned long pth, int sig))
 {
        struct cobalt_local_hkey hkey;
        struct cobalt_thread *thread;
@@ -739,7 +739,7 @@ COBALT_SYSCALL(thread_kill, conforming,
        return ret;
 }
 
-COBALT_SYSCALL(thread_join, primary, int, (unsigned long pth))
+COBALT_SYSCALL(thread_join, primary, (unsigned long pth))
 {
        struct cobalt_local_hkey hkey;
        struct cobalt_thread *thread;
@@ -761,7 +761,7 @@ COBALT_SYSCALL(thread_join, primary, int, (unsigned long 
pth))
        return xnthread_join(&thread->threadbase, false);
 }
 
-COBALT_SYSCALL(thread_getpid, current, pid_t, (unsigned long pth))
+COBALT_SYSCALL(thread_getpid, current, (unsigned long pth))
 {
        struct cobalt_local_hkey hkey;
        struct cobalt_thread *thread;
@@ -786,8 +786,7 @@ COBALT_SYSCALL(thread_getpid, current, pid_t, (unsigned 
long pth))
 }
 
 COBALT_SYSCALL(thread_getstat, current,
-              int, (pid_t pid,
-                    struct cobalt_threadstat __user *u_stat))
+              (pid_t pid, struct cobalt_threadstat __user *u_stat))
 {
        struct cobalt_threadstat stat;
        struct cobalt_thread *p;
diff --git a/kernel/cobalt/posix/thread.h b/kernel/cobalt/posix/thread.h
index 34dc6cc..d00879f 100644
--- a/kernel/cobalt/posix/thread.h
+++ b/kernel/cobalt/posix/thread.h
@@ -142,9 +142,9 @@ struct cobalt_thread *cobalt_thread_find_local(pid_t pid);
 struct cobalt_thread *cobalt_thread_lookup(unsigned long pth);
 
 COBALT_SYSCALL_DECL(thread_create,
-                   int, (unsigned long pth, int policy,
-                         struct sched_param_ex __user *u_param,
-                         int xid, __u32 __user *u_winoff));
+                   (unsigned long pth, int policy,
+                    struct sched_param_ex __user *u_param,
+                    int xid, __u32 __user *u_winoff));
 
 struct cobalt_thread *
 cobalt_thread_shadow(struct task_struct *p,
@@ -152,34 +152,31 @@ cobalt_thread_shadow(struct task_struct *p,
                     __u32 __user *u_winoff);
 
 COBALT_SYSCALL_DECL(thread_setmode,
-                   int, (int clrmask, int setmask, int __user *u_mode_r));
+                   (int clrmask, int setmask, int __user *u_mode_r));
 
 COBALT_SYSCALL_DECL(thread_setname,
-                   int, (unsigned long pth, const char __user *u_name));
+                   (unsigned long pth, const char __user *u_name));
 
-COBALT_SYSCALL_DECL(thread_kill,
-                   int, (unsigned long pth, int sig));
+COBALT_SYSCALL_DECL(thread_kill, (unsigned long pth, int sig));
 
-COBALT_SYSCALL_DECL(thread_join, int, (unsigned long pth));
+COBALT_SYSCALL_DECL(thread_join, (unsigned long pth));
 
-COBALT_SYSCALL_DECL(thread_getpid,
-                   pid_t, (unsigned long pth));
+COBALT_SYSCALL_DECL(thread_getpid, (unsigned long pth));
 
 COBALT_SYSCALL_DECL(thread_getstat,
-                   int, (pid_t pid,
-                         struct cobalt_threadstat __user *u_stat));
+                   (pid_t pid, struct cobalt_threadstat __user *u_stat));
 
 COBALT_SYSCALL_DECL(thread_setschedparam_ex,
-                   int, (unsigned long pth,
-                         int policy,
-                         const struct sched_param_ex __user *u_param,
-                         __u32 __user *u_winoff,
-                         int __user *u_promoted));
+                   (unsigned long pth,
+                    int policy,
+                    const struct sched_param_ex __user *u_param,
+                    __u32 __user *u_winoff,
+                    int __user *u_promoted));
 
 COBALT_SYSCALL_DECL(thread_getschedparam_ex,
-                   int, (unsigned long pth,
-                         int __user *u_policy,
-                         struct sched_param_ex __user *u_param));
+                   (unsigned long pth,
+                    int __user *u_policy,
+                    struct sched_param_ex __user *u_param));
 
 void cobalt_thread_map(struct xnthread *curr);
 
diff --git a/kernel/cobalt/posix/timer.c b/kernel/cobalt/posix/timer.c
index a2886e0..ac265cc 100644
--- a/kernel/cobalt/posix/timer.c
+++ b/kernel/cobalt/posix/timer.c
@@ -439,7 +439,7 @@ fail:
        return -EINVAL;
 }
 
-COBALT_SYSCALL(timer_delete, current, int, (timer_t timerid))
+COBALT_SYSCALL(timer_delete, current, (timer_t timerid))
 {
        return timer_delete(timerid);
 }
@@ -464,9 +464,9 @@ int __cobalt_timer_create(clockid_t clock,
 }
 
 COBALT_SYSCALL(timer_create, current,
-              int, (clockid_t clock,
-                    const struct sigevent __user *u_sev,
-                    timer_t __user *u_tm))
+              (clockid_t clock,
+               const struct sigevent __user *u_sev,
+               timer_t __user *u_tm))
 {
        struct sigevent sev, *evp = NULL;
 
@@ -480,9 +480,9 @@ COBALT_SYSCALL(timer_create, current,
 }
 
 COBALT_SYSCALL(timer_settime, primary,
-              int, (timer_t tm, int flags,
-                    const struct itimerspec __user *u_newval,
-                    struct itimerspec __user *u_oldval))
+              (timer_t tm, int flags,
+               const struct itimerspec __user *u_newval,
+               struct itimerspec __user *u_oldval))
 {
        struct itimerspec newv, oldv, *oldvp = &oldv;
        int ret;
@@ -506,7 +506,7 @@ COBALT_SYSCALL(timer_settime, primary,
 }
 
 COBALT_SYSCALL(timer_gettime, current,
-              int, (timer_t tm, struct itimerspec __user *u_val))
+              (timer_t tm, struct itimerspec __user *u_val))
 {
        struct itimerspec val;
        int ret;
@@ -518,8 +518,7 @@ COBALT_SYSCALL(timer_gettime, current,
        return __xn_safe_copy_to_user(u_val, &val, sizeof(val));
 }
 
-COBALT_SYSCALL(timer_getoverrun, current,
-              int, (timer_t timerid))
+COBALT_SYSCALL(timer_getoverrun, current, (timer_t timerid))
 {
        struct cobalt_timer *timer;
        struct cobalt_process *cc;
diff --git a/kernel/cobalt/posix/timer.h b/kernel/cobalt/posix/timer.h
index c25469b..630faec 100644
--- a/kernel/cobalt/posix/timer.h
+++ b/kernel/cobalt/posix/timer.h
@@ -69,20 +69,20 @@ int __cobalt_timer_settime(timer_t timerid, int flags,
 int __cobalt_timer_gettime(timer_t timerid, struct itimerspec *value);
 
 COBALT_SYSCALL_DECL(timer_create,
-                   int, (clockid_t clock,
-                         const struct sigevent __user *u_sev,
-                         timer_t __user *u_tm));
+                   (clockid_t clock,
+                    const struct sigevent __user *u_sev,
+                    timer_t __user *u_tm));
 
-COBALT_SYSCALL_DECL(timer_delete, int, (timer_t tm));
+COBALT_SYSCALL_DECL(timer_delete, (timer_t tm));
 
 COBALT_SYSCALL_DECL(timer_settime,
-                   int, (timer_t tm, int flags,
-                         const struct itimerspec __user *u_newval,
-                         struct itimerspec __user *u_oldval));
+                   (timer_t tm, int flags,
+                    const struct itimerspec __user *u_newval,
+                    struct itimerspec __user *u_oldval));
 
 COBALT_SYSCALL_DECL(timer_gettime,
-                   int, (timer_t tm, struct itimerspec __user *u_val));
+                   (timer_t tm, struct itimerspec __user *u_val));
 
-COBALT_SYSCALL_DECL(timer_getoverrun, int, (timer_t tm));
+COBALT_SYSCALL_DECL(timer_getoverrun, (timer_t tm));
 
 #endif /* !_COBALT_POSIX_TIMER_H */
diff --git a/kernel/cobalt/posix/timerfd.c b/kernel/cobalt/posix/timerfd.c
index 93cbf01..ad3b9bf 100644
--- a/kernel/cobalt/posix/timerfd.c
+++ b/kernel/cobalt/posix/timerfd.c
@@ -164,8 +164,7 @@ static void timerfd_handler(struct xntimer *xntimer)
                xnthread_unblock(tfd->target);
 }
 
-COBALT_SYSCALL(timerfd_create, lostage,
-              int, (int clockid, int flags))
+COBALT_SYSCALL(timerfd_create, lostage, (int clockid, int flags))
 {
        struct cobalt_tfd *tfd;
        struct xnthread *curr;
@@ -278,9 +277,9 @@ out:
 }
 
 COBALT_SYSCALL(timerfd_settime, primary,
-              int, (int fd, int flags,
-                    const struct itimerspec __user *new_value,
-                    struct itimerspec __user *old_value))
+              (int fd, int flags,
+               const struct itimerspec __user *new_value,
+               struct itimerspec __user *old_value))
 {
        struct itimerspec ovalue, value;
        int ret;
@@ -322,7 +321,7 @@ int __cobalt_timerfd_gettime(int fd, struct itimerspec 
*value)
 }
 
 COBALT_SYSCALL(timerfd_gettime, current,
-              int, (int fd, struct itimerspec __user *curr_value))
+              (int fd, struct itimerspec __user *curr_value))
 {
        struct itimerspec value;
        int ret;
diff --git a/kernel/cobalt/posix/timerfd.h b/kernel/cobalt/posix/timerfd.h
index 1539254..82c35d0 100644
--- a/kernel/cobalt/posix/timerfd.h
+++ b/kernel/cobalt/posix/timerfd.h
@@ -12,14 +12,14 @@ int __cobalt_timerfd_gettime(int fd,
                             struct itimerspec *value);
 
 COBALT_SYSCALL_DECL(timerfd_create,
-                   int, (int clockid, int flags));
+                   (int clockid, int flags));
 
 COBALT_SYSCALL_DECL(timerfd_settime,
-                   int, (int fd, int flags,
-                         const struct itimerspec __user *new_value,
-                         struct itimerspec __user *old_value));
+                   (int fd, int flags,
+                    const struct itimerspec __user *new_value,
+                    struct itimerspec __user *old_value));
 
 COBALT_SYSCALL_DECL(timerfd_gettime,
-                   int, (int fd, struct itimerspec __user *curr_value));
+                   (int fd, struct itimerspec __user *curr_value));
 
 #endif /* TIMERFD_H */


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to