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

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.

---

 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-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         |    2 +-
 lib/cobalt/init.c                       |    1 -
 lib/cobalt/printf.c                     |    2 +-
 27 files changed, 4 insertions(+), 177 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-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..0d976b1 100644
--- a/include/cobalt/uapi/monitor.h
+++ b/include/cobalt/uapi/monitor.h
@@ -18,7 +18,7 @@
 #ifndef _COBALT_UAPI_MONITOR_H
 #define _COBALT_UAPI_MONITOR_H
 
-#include <asm/xenomai/atomic.h>
+#include <asm-generic/xenomai/atomic.h>
 
 struct cobalt_monitor_data {
        atomic_long_t owner;
diff --git a/include/cobalt/uapi/mutex.h b/include/cobalt/uapi/mutex.h
index be376f3..b92a5c1 100644
--- a/include/cobalt/uapi/mutex.h
+++ b/include/cobalt/uapi/mutex.h
@@ -18,7 +18,7 @@
 #ifndef _COBALT_UAPI_MUTEX_H
 #define _COBALT_UAPI_MUTEX_H
 
-#include <asm/xenomai/atomic.h>
+#include <asm-generic/xenomai/atomic.h>
 
 #define COBALT_MUTEX_MAGIC  0x86860303
 
diff --git a/include/cobalt/uapi/sys/synch.h b/include/cobalt/uapi/sys/synch.h
index a82c017..b1a92f5 100644
--- a/include/cobalt/uapi/sys/synch.h
+++ b/include/cobalt/uapi/sys/synch.h
@@ -20,7 +20,7 @@
 #define _COBALT_UAPI_SYS_SYNCH_H
 
 #include <cobalt/uapi/sys/types.h>
-#include <asm/xenomai/atomic.h>
+#include <asm-generic/xenomai/atomic.h>
 
 /* Creation flags */
 #define XNSYNCH_FIFO    0x0
diff --git a/lib/cobalt/init.c b/lib/cobalt/init.c
index bc7acb5..f9fd016 100644
--- a/lib/cobalt/init.c
+++ b/lib/cobalt/init.c
@@ -27,7 +27,6 @@
 #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>
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"


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

Reply via email to