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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Sat Jun 29 17:06:38 2013 +0200

cobalt/kernel: drop <asm/xenomai/atomic.h>

We define no arch-specific implementations for atomic operations
anymore. We use the regular linux helpers in kernel code, and generic
GCC atomic builtins in userland.

<asm-generic/xenomai/atomic.h> becomes a userland only header.

---

 include/cobalt/asm-arm/Makefile.am      |    1 -
 include/cobalt/asm-arm/Makefile.in      |    1 -
 include/cobalt/asm-arm/atomic.h         |   28 -------------------------
 include/cobalt/asm-arm/machine.h        |    1 -
 include/cobalt/asm-blackfin/Makefile.am |    1 -
 include/cobalt/asm-blackfin/Makefile.in |    1 -
 include/cobalt/asm-blackfin/atomic.h    |   25 ----------------------
 include/cobalt/asm-generic/atomic.h     |   34 ++++++++++++------------------
 include/cobalt/asm-nios2/Makefile.am    |    1 -
 include/cobalt/asm-nios2/Makefile.in    |    1 -
 include/cobalt/asm-nios2/atomic.h       |   25 ----------------------
 include/cobalt/asm-powerpc/Makefile.am  |    1 -
 include/cobalt/asm-powerpc/Makefile.in  |    1 -
 include/cobalt/asm-powerpc/atomic.h     |   28 -------------------------
 include/cobalt/asm-sh/Makefile.am       |    1 -
 include/cobalt/asm-sh/Makefile.in       |    1 -
 include/cobalt/asm-sh/atomic.h          |   25 ----------------------
 include/cobalt/asm-sh/syscall.h         |    1 -
 include/cobalt/asm-x86/Makefile.am      |    1 -
 include/cobalt/asm-x86/Makefile.in      |    1 -
 include/cobalt/asm-x86/atomic.h         |   25 ----------------------
 include/cobalt/kernel/lock.h            |    1 -
 include/cobalt/kernel/shadow.h          |    1 -
 include/cobalt/uapi/monitor.h           |    2 -
 include/cobalt/uapi/mutex.h             |    2 -
 include/cobalt/uapi/sys/synch.h         |    1 -
 include/copperplate/syncobj.h           |    1 +
 lib/cobalt/clock.c                      |    1 -
 lib/cobalt/cond.c                       |    3 --
 lib/cobalt/current.c                    |    3 --
 lib/cobalt/init.c                       |    2 -
 lib/cobalt/internal.c                   |    4 ---
 lib/cobalt/internal.h                   |    4 +++
 lib/cobalt/mutex.c                      |    2 -
 lib/cobalt/printf.c                     |    2 +-
 lib/cobalt/sem_heap.c                   |    1 -
 36 files changed, 20 insertions(+), 214 deletions(-)

diff --git a/include/cobalt/asm-arm/Makefile.am 
b/include/cobalt/asm-arm/Makefile.am
index 3eb213c..bff67ba 100644
--- a/include/cobalt/asm-arm/Makefile.am
+++ b/include/cobalt/asm-arm/Makefile.am
@@ -2,7 +2,6 @@ includesubdir = $(includedir)/asm-arm
 
 includesub_HEADERS =   \
        arith.h         \
-       atomic.h        \
        calibration.h   \
        features.h      \
        fptest.h        \
diff --git a/include/cobalt/asm-arm/Makefile.in 
b/include/cobalt/asm-arm/Makefile.in
index ead54c0..c4c7bb9 100644
--- a/include/cobalt/asm-arm/Makefile.in
+++ b/include/cobalt/asm-arm/Makefile.in
@@ -275,7 +275,6 @@ top_srcdir = @top_srcdir@
 includesubdir = $(includedir)/asm-arm
 includesub_HEADERS = \
        arith.h         \
-       atomic.h        \
        calibration.h   \
        features.h      \
        fptest.h        \
diff --git a/include/cobalt/asm-arm/atomic.h b/include/cobalt/asm-arm/atomic.h
deleted file mode 100644
index a90f89c..0000000
--- a/include/cobalt/asm-arm/atomic.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (C) 2003,2004 Philippe Gerum <r...@xenomai.org>.
- *
- * ARM port
- *   Copyright (C) 2005 Stelian Pop
- *
- * Xenomai is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published
- * by the Free Software Foundation; either version 2 of the License,
- * or (at your option) any later version.
- *
- * Xenomai is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Xenomai; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef _COBALT_ASM_ARM_ATOMIC_H
-#define _COBALT_ASM_ARM_ATOMIC_H
-
-#include <asm-generic/xenomai/atomic.h>
-
-#endif /* !_COBALT_ASM_ARM_ATOMIC_H */
diff --git a/include/cobalt/asm-arm/machine.h b/include/cobalt/asm-arm/machine.h
index 18bd864..8e5e31c 100644
--- a/include/cobalt/asm-arm/machine.h
+++ b/include/cobalt/asm-arm/machine.h
@@ -35,7 +35,6 @@
 
 #include <asm/system.h>
 #include <asm/timex.h>
-#include <asm/xenomai/atomic.h>
 #include <asm/processor.h>
 #include <asm/ipipe.h>
 #include <asm/mach/irq.h>
diff --git a/include/cobalt/asm-blackfin/Makefile.am 
b/include/cobalt/asm-blackfin/Makefile.am
index c10b3ef..f13abe0 100644
--- a/include/cobalt/asm-blackfin/Makefile.am
+++ b/include/cobalt/asm-blackfin/Makefile.am
@@ -2,7 +2,6 @@ includesubdir = $(includedir)/asm-blackfin
 
 includesub_HEADERS =   \
        arith.h         \
-       atomic.h        \
        calibration.h   \
        features.h      \
        fptest.h        \
diff --git a/include/cobalt/asm-blackfin/Makefile.in 
b/include/cobalt/asm-blackfin/Makefile.in
index aca8308..7c640ae 100644
--- a/include/cobalt/asm-blackfin/Makefile.in
+++ b/include/cobalt/asm-blackfin/Makefile.in
@@ -275,7 +275,6 @@ top_srcdir = @top_srcdir@
 includesubdir = $(includedir)/asm-blackfin
 includesub_HEADERS = \
        arith.h         \
-       atomic.h        \
        calibration.h   \
        features.h      \
        fptest.h        \
diff --git a/include/cobalt/asm-blackfin/atomic.h 
b/include/cobalt/asm-blackfin/atomic.h
deleted file mode 100644
index 9b6e321..0000000
--- a/include/cobalt/asm-blackfin/atomic.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (C) 2005 Philippe Gerum <r...@xenomai.org>.
- *
- * Xenomai is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published
- * by the Free Software Foundation; either version 2 of the License,
- * or (at your option) any later version.
- *
- * Xenomai is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Xenomai; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef _COBALT_ASM_BLACKFIN_ATOMIC_H
-#define _COBALT_ASM_BLACKFIN_ATOMIC_H
-
-#include <asm-generic/xenomai/atomic.h>
-
-#endif /* !_COBALT_ASM_BLACKFIN_ATOMIC_H */
diff --git a/include/cobalt/asm-generic/atomic.h 
b/include/cobalt/asm-generic/atomic.h
index a9a7b85..4ed8407 100644
--- a/include/cobalt/asm-generic/atomic.h
+++ b/include/cobalt/asm-generic/atomic.h
@@ -1,28 +1,24 @@
 /**
- *   Copyright &copy; 2011 Gilles Chanteperdrix.
+ *   Copyright &copy; 2011 Gilles Chanteperdrix 
<gilles.chanteperd...@xenomai.org>.
+ *   Copyright &copy; 2013 Philippe Gerum <r...@xenomai.org>.
  *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation, Inc., 675 Mass Ave, Cambridge MA 02139,
- *   USA; either version 2 of the License, or (at your option) any later
- *   version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
  *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- *   Generic atomic operations.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
  */
 #ifndef _COBALT_ASM_GENERIC_ATOMIC_H
 #define _COBALT_ASM_GENERIC_ATOMIC_H
 
-#ifndef __KERNEL__
-
 #include <xeno_config.h>
 
 typedef struct {
@@ -60,6 +56,4 @@ typedef struct {
 #define smp_wmb() __sync_synchronize()
 #endif
 
-#endif /* !__KERNEL__ */
-
 #endif /* _COBALT_ASM_GENERIC_ATOMIC_H */
diff --git a/include/cobalt/asm-nios2/Makefile.am 
b/include/cobalt/asm-nios2/Makefile.am
index a026329..5996008 100644
--- a/include/cobalt/asm-nios2/Makefile.am
+++ b/include/cobalt/asm-nios2/Makefile.am
@@ -2,7 +2,6 @@ includesubdir = $(includedir)/asm-nios2
 
 includesub_HEADERS =   \
        arith.h         \
-       atomic.h        \
        calibration.h   \
        features.h      \
        fptest.h        \
diff --git a/include/cobalt/asm-nios2/Makefile.in 
b/include/cobalt/asm-nios2/Makefile.in
index 9b8228c..1ff3c3d 100644
--- a/include/cobalt/asm-nios2/Makefile.in
+++ b/include/cobalt/asm-nios2/Makefile.in
@@ -275,7 +275,6 @@ top_srcdir = @top_srcdir@
 includesubdir = $(includedir)/asm-nios2
 includesub_HEADERS = \
        arith.h         \
-       atomic.h        \
        calibration.h   \
        features.h      \
        fptest.h        \
diff --git a/include/cobalt/asm-nios2/atomic.h 
b/include/cobalt/asm-nios2/atomic.h
deleted file mode 100644
index 348854b..0000000
--- a/include/cobalt/asm-nios2/atomic.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (C) 2009 Philippe Gerum <r...@xenomai.org>.
- *
- * Xenomai is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published
- * by the Free Software Foundation; either version 2 of the License,
- * or (at your option) any later version.
- *
- * Xenomai is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Xenomai; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef _COBALT_ASM_NIOS2_ATOMIC_H
-#define _COBALT_ASM_NIOS2_ATOMIC_H
-
-#include <asm-generic/xenomai/atomic.h>
-
-#endif /* !_COBALT_ASM_NIOS2_ATOMIC_H */
diff --git a/include/cobalt/asm-powerpc/Makefile.am 
b/include/cobalt/asm-powerpc/Makefile.am
index 51d2f69..d5c9e80 100644
--- a/include/cobalt/asm-powerpc/Makefile.am
+++ b/include/cobalt/asm-powerpc/Makefile.am
@@ -2,7 +2,6 @@ includesubdir = $(includedir)/asm-powerpc
 
 includesub_HEADERS =   \
        arith.h         \
-       atomic.h        \
        calibration.h   \
        features.h      \
        fptest.h        \
diff --git a/include/cobalt/asm-powerpc/Makefile.in 
b/include/cobalt/asm-powerpc/Makefile.in
index f920a81..10a0449 100644
--- a/include/cobalt/asm-powerpc/Makefile.in
+++ b/include/cobalt/asm-powerpc/Makefile.in
@@ -275,7 +275,6 @@ top_srcdir = @top_srcdir@
 includesubdir = $(includedir)/asm-powerpc
 includesub_HEADERS = \
        arith.h         \
-       atomic.h        \
        calibration.h   \
        features.h      \
        fptest.h        \
diff --git a/include/cobalt/asm-powerpc/atomic.h 
b/include/cobalt/asm-powerpc/atomic.h
deleted file mode 100644
index 1698740..0000000
--- a/include/cobalt/asm-powerpc/atomic.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (C) 2003,2004 Philippe Gerum <r...@xenomai.org>.
- *
- * 64-bit PowerPC adoption
- *   copyright (C) 2005 Taneli Vähäkangas and Heikki Lindholm
- *
- * Xenomai is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published
- * by the Free Software Foundation; either version 2 of the License,
- * or (at your option) any later version.
- *
- * Xenomai is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Xenomai; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef _COBALT_ASM_POWERPC_ATOMIC_H
-#define _COBALT_ASM_POWERPC_ATOMIC_H
-
-#include <asm-generic/xenomai/atomic.h>
-
-#endif /* !_COBALT_ASM_POWERPC_ATOMIC_H */
diff --git a/include/cobalt/asm-sh/Makefile.am 
b/include/cobalt/asm-sh/Makefile.am
index 6885ee6..f97a3fe 100644
--- a/include/cobalt/asm-sh/Makefile.am
+++ b/include/cobalt/asm-sh/Makefile.am
@@ -2,7 +2,6 @@ includesubdir = $(includedir)/asm-sh
 
 includesub_HEADERS =   \
        arith.h         \
-       atomic.h        \
        calibration.h   \
        features.h      \
        fptest.h        \
diff --git a/include/cobalt/asm-sh/Makefile.in 
b/include/cobalt/asm-sh/Makefile.in
index 6b0d659..a998c6a 100644
--- a/include/cobalt/asm-sh/Makefile.in
+++ b/include/cobalt/asm-sh/Makefile.in
@@ -275,7 +275,6 @@ top_srcdir = @top_srcdir@
 includesubdir = $(includedir)/asm-sh
 includesub_HEADERS = \
        arith.h         \
-       atomic.h        \
        calibration.h   \
        features.h      \
        fptest.h        \
diff --git a/include/cobalt/asm-sh/atomic.h b/include/cobalt/asm-sh/atomic.h
deleted file mode 100644
index 16ff7b6..0000000
--- a/include/cobalt/asm-sh/atomic.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (C) 2011 Philippe Gerum <r...@xenomai.org>.
- *
- * Xenomai is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published
- * by the Free Software Foundation; either version 2 of the License,
- * or (at your option) any later version.
- *
- * Xenomai is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Xenomai; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef _COBALT_ASM_SH_ATOMIC_H
-#define _COBALT_ASM_SH_ATOMIC_H
-
-#include <asm-generic/xenomai/atomic.h>
-
-#endif /* !_COBALT_ASM_SH_ATOMIC_H */
diff --git a/include/cobalt/asm-sh/syscall.h b/include/cobalt/asm-sh/syscall.h
index 81d342f..2d8a521 100644
--- a/include/cobalt/asm-sh/syscall.h
+++ b/include/cobalt/asm-sh/syscall.h
@@ -79,7 +79,6 @@ static inline int xnarch_local_syscall(void)
 #else /* !__KERNEL__ */
 
 #include <errno.h>
-#include <asm/xenomai/atomic.h>
 
 /*
  * The following code defines an inline syscall mechanism used by
diff --git a/include/cobalt/asm-x86/Makefile.am 
b/include/cobalt/asm-x86/Makefile.am
index 1d1ede4..d44b6c5 100644
--- a/include/cobalt/asm-x86/Makefile.am
+++ b/include/cobalt/asm-x86/Makefile.am
@@ -2,7 +2,6 @@ includesubdir = $(includedir)/asm-x86
 
 includesub_HEADERS =   \
        arith.h         \
-       atomic.h        \
        calibration.h   \
        features.h      \
        fptest.h        \
diff --git a/include/cobalt/asm-x86/Makefile.in 
b/include/cobalt/asm-x86/Makefile.in
index 0c4da74..ae8636f 100644
--- a/include/cobalt/asm-x86/Makefile.in
+++ b/include/cobalt/asm-x86/Makefile.in
@@ -275,7 +275,6 @@ top_srcdir = @top_srcdir@
 includesubdir = $(includedir)/asm-x86
 includesub_HEADERS = \
        arith.h         \
-       atomic.h        \
        calibration.h   \
        features.h      \
        fptest.h        \
diff --git a/include/cobalt/asm-x86/atomic.h b/include/cobalt/asm-x86/atomic.h
deleted file mode 100644
index ad3d855..0000000
--- a/include/cobalt/asm-x86/atomic.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (C) 2007 Philippe Gerum <r...@xenomai.org>.
- *
- * Xenomai is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published
- * by the Free Software Foundation; either version 2 of the License,
- * or (at your option) any later version.
- *
- * Xenomai is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Xenomai; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef _COBALT_ASM_X86_ATOMIC_H
-#define _COBALT_ASM_X86_ATOMIC_H
-
-#include <asm-generic/xenomai/atomic.h>
-
-#endif /* !_COBALT_ASM_X86_ATOMIC_64_H */
diff --git a/include/cobalt/kernel/lock.h b/include/cobalt/kernel/lock.h
index 07851c0..de46d44 100644
--- a/include/cobalt/kernel/lock.h
+++ b/include/cobalt/kernel/lock.h
@@ -26,7 +26,6 @@
 
 #include <linux/ipipe.h>
 #include <cobalt/kernel/assert.h>
-#include <asm/xenomai/atomic.h>
 
 /** \addtogroup lock
  *@{*/
diff --git a/include/cobalt/kernel/shadow.h b/include/cobalt/kernel/shadow.h
index 38e5cc2..5afadf8 100644
--- a/include/cobalt/kernel/shadow.h
+++ b/include/cobalt/kernel/shadow.h
@@ -20,7 +20,6 @@
 #ifndef _COBALT_KERNEL_SHADOW_H
 #define _COBALT_KERNEL_SHADOW_H
 
-#include <asm/xenomai/atomic.h>
 #include <asm/xenomai/syscall.h>
 
 struct xnthread;
diff --git a/include/cobalt/uapi/monitor.h b/include/cobalt/uapi/monitor.h
index ffa139b..dbd578f 100644
--- a/include/cobalt/uapi/monitor.h
+++ b/include/cobalt/uapi/monitor.h
@@ -18,8 +18,6 @@
 #ifndef _COBALT_UAPI_MONITOR_H
 #define _COBALT_UAPI_MONITOR_H
 
-#include <asm/xenomai/atomic.h>
-
 struct cobalt_monitor_data {
        atomic_long_t owner;
        unsigned long flags;
diff --git a/include/cobalt/uapi/mutex.h b/include/cobalt/uapi/mutex.h
index be376f3..dec09e2 100644
--- a/include/cobalt/uapi/mutex.h
+++ b/include/cobalt/uapi/mutex.h
@@ -18,8 +18,6 @@
 #ifndef _COBALT_UAPI_MUTEX_H
 #define _COBALT_UAPI_MUTEX_H
 
-#include <asm/xenomai/atomic.h>
-
 #define COBALT_MUTEX_MAGIC  0x86860303
 
 struct mutex_dat {
diff --git a/include/cobalt/uapi/sys/synch.h b/include/cobalt/uapi/sys/synch.h
index a82c017..491fcc4 100644
--- a/include/cobalt/uapi/sys/synch.h
+++ b/include/cobalt/uapi/sys/synch.h
@@ -20,7 +20,6 @@
 #define _COBALT_UAPI_SYS_SYNCH_H
 
 #include <cobalt/uapi/sys/types.h>
-#include <asm/xenomai/atomic.h>
 
 /* Creation flags */
 #define XNSYNCH_FIFO    0x0
diff --git a/include/copperplate/syncobj.h b/include/copperplate/syncobj.h
index d71de82..3a8b67a 100644
--- a/include/copperplate/syncobj.h
+++ b/include/copperplate/syncobj.h
@@ -43,6 +43,7 @@ struct syncstate {
 
 #ifdef CONFIG_XENO_COBALT
 
+#include <asm-generic/xenomai/atomic.h>
 #include <cobalt/uapi/monitor.h>
 
 struct syncobj_corespec {
diff --git a/lib/cobalt/clock.c b/lib/cobalt/clock.c
index d9cdc89..ea0359f 100644
--- a/lib/cobalt/clock.c
+++ b/lib/cobalt/clock.c
@@ -29,7 +29,6 @@
 #include <asm-generic/xenomai/timeconv.h>
 #include <cobalt/uapi/syscall.h>
 #include <cobalt/uapi/time.h>
-#include <cobalt/uapi/sys/vdso.h>
 #include "sem_heap.h"
 #include "internal.h"
 
diff --git a/lib/cobalt/cond.c b/lib/cobalt/cond.c
index a6cfc97..0165930 100644
--- a/lib/cobalt/cond.c
+++ b/lib/cobalt/cond.c
@@ -19,9 +19,6 @@
 #include <pthread.h>
 #include <asm/xenomai/syscall.h>
 #include <cobalt/uapi/syscall.h>
-#include <cobalt/uapi/mutex.h>
-#include <cobalt/uapi/cond.h>
-#include <cobalt/uapi/sys/synch.h>
 #include "current.h"
 #include "internal.h"
 
diff --git a/lib/cobalt/current.c b/lib/cobalt/current.c
index f41a904..d16f37d 100644
--- a/lib/cobalt/current.c
+++ b/lib/cobalt/current.c
@@ -2,11 +2,8 @@
 #include <stdio.h>
 #include <string.h>
 #include <pthread.h>
-
 #include <asm/xenomai/syscall.h>
-#include <cobalt/uapi/thread.h>
 #include <cobalt/uapi/syscall.h>
-#include <cobalt/uapi/sys/vdso.h>
 #include "current.h"
 #include "internal.h"
 
diff --git a/lib/cobalt/init.c b/lib/cobalt/init.c
index bc7acb5..508a8f4 100644
--- a/lib/cobalt/init.c
+++ b/lib/cobalt/init.c
@@ -27,10 +27,8 @@
 #include <unistd.h>
 #include <asm/xenomai/features.h>
 #include <asm/xenomai/syscall.h>
-#include <asm/xenomai/atomic.h>
 #include <asm-generic/xenomai/stack.h>
 #include <cobalt/uapi/syscall.h>
-#include <cobalt/uapi/mutex.h>
 #include <cobalt/uapi/sys/heap.h>
 #include <cobalt/uapi/rtdm/syscall.h>
 #include <rtdk.h>
diff --git a/lib/cobalt/internal.c b/lib/cobalt/internal.c
index 66ba266..0e81002 100644
--- a/lib/cobalt/internal.c
+++ b/lib/cobalt/internal.c
@@ -29,11 +29,7 @@
 #include <errno.h>
 #include <pthread.h>
 #include <asm/xenomai/syscall.h>
-#include <cobalt/uapi/thread.h>
 #include <cobalt/uapi/syscall.h>
-#include <cobalt/uapi/monitor.h>
-#include <cobalt/uapi/event.h>
-#include <cobalt/uapi/sys/synch.h>
 #include "current.h"
 #include "internal.h"
 
diff --git a/lib/cobalt/internal.h b/lib/cobalt/internal.h
index 51f913a..beed890 100644
--- a/lib/cobalt/internal.h
+++ b/lib/cobalt/internal.h
@@ -3,10 +3,14 @@
 
 #include <signal.h>
 #include <pthread.h>
+#include <asm-generic/xenomai/atomic.h>
+#include <cobalt/uapi/sys/synch.h>
+#include <cobalt/uapi/sys/vdso.h>
 #include <cobalt/uapi/mutex.h>
 #include <cobalt/uapi/event.h>
 #include <cobalt/uapi/monitor.h>
 #include <cobalt/uapi/thread.h>
+#include <cobalt/uapi/cond.h>
 #include "current.h"
 
 #define report_error(fmt, args...) \
diff --git a/lib/cobalt/mutex.c b/lib/cobalt/mutex.c
index 456349d..7903578 100644
--- a/lib/cobalt/mutex.c
+++ b/lib/cobalt/mutex.c
@@ -19,9 +19,7 @@
 #include <pthread.h>
 #include <limits.h>
 #include <asm/xenomai/syscall.h>
-#include <cobalt/uapi/mutex.h>
 #include <cobalt/uapi/syscall.h>
-#include <cobalt/uapi/sys/synch.h>
 #include "current.h"
 #include "internal.h"
 
diff --git a/lib/cobalt/printf.c b/lib/cobalt/printf.c
index 1094f96..c0bb78e 100644
--- a/lib/cobalt/printf.c
+++ b/lib/cobalt/printf.c
@@ -27,7 +27,7 @@
 #include <unistd.h>
 #include <syslog.h>
 #include <rtdk.h>
-#include <asm/xenomai/atomic.h>        /* For atomic_long_cmpxchg */
+#include <asm-generic/xenomai/atomic.h>
 #include <asm-generic/stack.h>
 #include "current.h"
 #include "internal.h"
diff --git a/lib/cobalt/sem_heap.c b/lib/cobalt/sem_heap.c
index cacdf5d..8a012b6 100644
--- a/lib/cobalt/sem_heap.c
+++ b/lib/cobalt/sem_heap.c
@@ -11,7 +11,6 @@
 #include <pthread.h>
 #include <asm/xenomai/syscall.h>
 #include <cobalt/uapi/syscall.h>
-#include <cobalt/uapi/sys/vdso.h>
 #include <cobalt/uapi/sys/heap.h>
 #include "current.h"
 #include "sem_heap.h"


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

Reply via email to