[PATCH 2/3] Using the generic atomic ops to implement UP mode atomic for all architectures. SMP atomic port will be later.

WeiY wei.a.yang at gmail.com
Tue Apr 23 16:34:16 UTC 2013


From: WeiY <wei.a.yang at gmail.com>

---
 cpukit/score/cpu/arm/Makefile.am                 |    1 +
 cpukit/score/cpu/arm/preinstall.am               |    3 ++
 cpukit/score/cpu/arm/rtems/score/cpuatomic.h     |   40 ++++++++++++++++++++++
 cpukit/score/cpu/avr/Makefile.am                 |    1 +
 cpukit/score/cpu/avr/preinstall.am               |    4 ++
 cpukit/score/cpu/avr/rtems/score/cpuatomic.h     |   40 ++++++++++++++++++++++
 cpukit/score/cpu/bfin/Makefile.am                |    1 +
 cpukit/score/cpu/bfin/preinstall.am              |    3 ++
 cpukit/score/cpu/bfin/rtems/score/cpuatomic.h    |   40 ++++++++++++++++++++++
 cpukit/score/cpu/h8300/Makefile.am               |    1 +
 cpukit/score/cpu/h8300/preinstall.am             |    3 ++
 cpukit/score/cpu/h8300/rtems/score/cpuatomic.h   |   40 ++++++++++++++++++++++
 cpukit/score/cpu/lm32/Makefile.am                |    1 +
 cpukit/score/cpu/lm32/preinstall.am              |    3 ++
 cpukit/score/cpu/lm32/rtems/score/cpuatomic.h    |   40 ++++++++++++++++++++++
 cpukit/score/cpu/m32c/Makefile.am                |    1 +
 cpukit/score/cpu/m32c/preinstall.am              |    3 ++
 cpukit/score/cpu/m32c/rtems/score/cpuatomic.h    |   40 ++++++++++++++++++++++
 cpukit/score/cpu/m32r/Makefile.am                |    1 +
 cpukit/score/cpu/m32r/preinstall.am              |    3 ++
 cpukit/score/cpu/m32r/rtems/score/cpuatomic.h    |   40 ++++++++++++++++++++++
 cpukit/score/cpu/m68k/Makefile.am                |    1 +
 cpukit/score/cpu/m68k/preinstall.am              |    3 ++
 cpukit/score/cpu/m68k/rtems/score/cpuatomic.h    |   40 ++++++++++++++++++++++
 cpukit/score/cpu/mips/Makefile.am                |    1 +
 cpukit/score/cpu/mips/preinstall.am              |    3 ++
 cpukit/score/cpu/mips/rtems/score/cpuatomic.h    |   40 ++++++++++++++++++++++
 cpukit/score/cpu/moxie/Makefile.am               |    1 +
 cpukit/score/cpu/moxie/preinstall.am             |    3 ++
 cpukit/score/cpu/moxie/rtems/score/cpuatomic.h   |   40 ++++++++++++++++++++++
 cpukit/score/cpu/nios2/Makefile.am               |    1 +
 cpukit/score/cpu/nios2/preinstall.am             |    3 ++
 cpukit/score/cpu/nios2/rtems/score/cpuatomic.h   |   40 ++++++++++++++++++++++
 cpukit/score/cpu/sh/Makefile.am                  |    1 +
 cpukit/score/cpu/sh/preinstall.am                |    3 ++
 cpukit/score/cpu/sh/rtems/score/cpuatomic.h      |   40 ++++++++++++++++++++++
 cpukit/score/cpu/sparc/Makefile.am               |    1 +
 cpukit/score/cpu/sparc/preinstall.am             |    3 ++
 cpukit/score/cpu/sparc/rtems/score/cpuatomic.h   |   40 ++++++++++++++++++++++
 cpukit/score/cpu/sparc64/Makefile.am             |    1 +
 cpukit/score/cpu/sparc64/preinstall.am           |    3 ++
 cpukit/score/cpu/sparc64/rtems/score/cpuatomic.h |   40 ++++++++++++++++++++++
 cpukit/score/cpu/v850/Makefile.am                |    1 +
 cpukit/score/cpu/v850/preinstall.am              |    3 ++
 cpukit/score/cpu/v850/rtems/score/cpuatomic.h    |   40 ++++++++++++++++++++++
 45 files changed, 661 insertions(+), 0 deletions(-)
 create mode 100644 cpukit/score/cpu/arm/rtems/score/cpuatomic.h
 create mode 100644 cpukit/score/cpu/avr/rtems/score/cpuatomic.h
 create mode 100644 cpukit/score/cpu/bfin/rtems/score/cpuatomic.h
 create mode 100644 cpukit/score/cpu/h8300/rtems/score/cpuatomic.h
 create mode 100644 cpukit/score/cpu/lm32/rtems/score/cpuatomic.h
 create mode 100644 cpukit/score/cpu/m32c/rtems/score/cpuatomic.h
 create mode 100644 cpukit/score/cpu/m32r/rtems/score/cpuatomic.h
 create mode 100644 cpukit/score/cpu/m68k/rtems/score/cpuatomic.h
 create mode 100644 cpukit/score/cpu/mips/rtems/score/cpuatomic.h
 create mode 100644 cpukit/score/cpu/moxie/rtems/score/cpuatomic.h
 create mode 100644 cpukit/score/cpu/nios2/rtems/score/cpuatomic.h
 create mode 100644 cpukit/score/cpu/sh/rtems/score/cpuatomic.h
 create mode 100644 cpukit/score/cpu/sparc/rtems/score/cpuatomic.h
 create mode 100644 cpukit/score/cpu/sparc64/rtems/score/cpuatomic.h
 create mode 100644 cpukit/score/cpu/v850/rtems/score/cpuatomic.h

diff --git a/cpukit/score/cpu/arm/Makefile.am b/cpukit/score/cpu/arm/Makefile.am
index 56a5fdd..61a278b 100644
--- a/cpukit/score/cpu/arm/Makefile.am
+++ b/cpukit/score/cpu/arm/Makefile.am
@@ -9,6 +9,7 @@ include_rtems_score_HEADERS += rtems/score/arm.h
 include_rtems_score_HEADERS += rtems/score/armv4.h
 include_rtems_score_HEADERS += rtems/score/armv7m.h
 include_rtems_score_HEADERS += rtems/score/types.h
+include_rtems_score_HEADERS += rtems/score/cpuatomic.h
 
 noinst_LIBRARIES = libscorecpu.a
 libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
diff --git a/cpukit/score/cpu/arm/preinstall.am b/cpukit/score/cpu/arm/preinstall.am
index fb8881d..af52d6f 100644
--- a/cpukit/score/cpu/arm/preinstall.am
+++ b/cpukit/score/cpu/arm/preinstall.am
@@ -51,3 +51,6 @@ $(PROJECT_INCLUDE)/rtems/score/types.h: rtems/score/types.h $(PROJECT_INCLUDE)/r
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/types.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/types.h
 
+$(PROJECT_INCLUDE)/rtems/score/cpuatomic.h: rtems/score/cpuatomic.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/cpuatomic.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/cpuatomic.h
diff --git a/cpukit/score/cpu/arm/rtems/score/cpuatomic.h b/cpukit/score/cpu/arm/rtems/score/cpuatomic.h
new file mode 100644
index 0000000..51e76f8
--- /dev/null
+++ b/cpukit/score/cpu/arm/rtems/score/cpuatomic.h
@@ -0,0 +1,40 @@
+/**
+ * @file  rtems/score/cpuatomic.h
+ * 
+ * This include file implements the atomic operations for arm and defines 
+ * atomic data types which are used by the atomic operations API file. This
+ * file should use fixed name cpuatomic.h and should be included in atomic
+ * operations API file atomic.h. If the architecture works at the UP mode it
+ * will use a generic atomic ops using disable/enable-IRQ simulated. If the
+ * the architecture works at SMP mode, most of the parts of implementations
+ * are imported from FreeBSD kernel.
+ */
+
+#ifndef _RTEMS_SCORE_ATOMIC_CPU_H
+#define _RTEMS_SCORE_ATOMIC_CPU_H
+
+#include <rtems/score/genericcpuatomic.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @defgroup RTEMS atomic implementation
+ *
+ */
+
+/**@{*/
+
+#if !defined(RTEMS_SMP)
+#include <rtems/score/genericatomicops.h>
+#else
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+/**@}*/
+#endif
+/*  end of include file */
diff --git a/cpukit/score/cpu/avr/Makefile.am b/cpukit/score/cpu/avr/Makefile.am
index efaf36e..bb5ce35 100644
--- a/cpukit/score/cpu/avr/Makefile.am
+++ b/cpukit/score/cpu/avr/Makefile.am
@@ -8,6 +8,7 @@ include_rtems_score_HEADERS = rtems/score/cpu.h
 include_rtems_score_HEADERS += rtems/score/avr.h
 include_rtems_score_HEADERS += rtems/score/cpu_asm.h
 include_rtems_score_HEADERS += rtems/score/types.h
+include_rtems_score_HEADERS += rtems/score/cpuatomic.h
 
 include_rtems_avrdir = $(includedir)/avr
 include_rtems_avr_HEADERS = avr/boot.h
diff --git a/cpukit/score/cpu/avr/preinstall.am b/cpukit/score/cpu/avr/preinstall.am
index d41e75f..ffa25a2 100644
--- a/cpukit/score/cpu/avr/preinstall.am
+++ b/cpukit/score/cpu/avr/preinstall.am
@@ -43,6 +43,10 @@ $(PROJECT_INCLUDE)/rtems/score/types.h: rtems/score/types.h $(PROJECT_INCLUDE)/r
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/types.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/types.h
 
+$(PROJECT_INCLUDE)/rtems/score/cpuatomic.h: rtems/score/cpuatomic.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/cpuatomic.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/cpuatomic.h
+
 $(PROJECT_INCLUDE)/avr/$(dirstamp):
 	@$(MKDIR_P) $(PROJECT_INCLUDE)/avr
 	@: > $(PROJECT_INCLUDE)/avr/$(dirstamp)
diff --git a/cpukit/score/cpu/avr/rtems/score/cpuatomic.h b/cpukit/score/cpu/avr/rtems/score/cpuatomic.h
new file mode 100644
index 0000000..abf0709
--- /dev/null
+++ b/cpukit/score/cpu/avr/rtems/score/cpuatomic.h
@@ -0,0 +1,40 @@
+/**
+ * @file  rtems/score/cpuatomic.h
+ * 
+ * This include file implements the atomic operations for avr and defines 
+ * atomic data types which are used by the atomic operations API file. This
+ * file should use fixed name cpuatomic.h and should be included in atomic
+ * operations API file atomic.h. If the architecture works at the UP mode it
+ * will use a generic atomic ops using disable/enable-IRQ simulated. If the
+ * the architecture works at SMP mode, most of the parts of implementations
+ * are imported from FreeBSD kernel.
+ */
+
+#ifndef _RTEMS_SCORE_ATOMIC_CPU_H
+#define _RTEMS_SCORE_ATOMIC_CPU_H
+
+#include <rtems/score/genericcpuatomic.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @defgroup RTEMS atomic implementation
+ *
+ */
+
+/**@{*/
+
+#if !defined(RTEMS_SMP)
+#include <rtems/score/genericatomicops.h>
+#else
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+/**@}*/
+#endif
+/*  end of include file */
diff --git a/cpukit/score/cpu/bfin/Makefile.am b/cpukit/score/cpu/bfin/Makefile.am
index c8a7cf7..48dfed4 100644
--- a/cpukit/score/cpu/bfin/Makefile.am
+++ b/cpukit/score/cpu/bfin/Makefile.am
@@ -13,6 +13,7 @@ include_rtems_score_HEADERS = rtems/score/cpu.h
 include_rtems_score_HEADERS += rtems/score/bfin.h
 include_rtems_score_HEADERS += rtems/score/cpu_asm.h
 include_rtems_score_HEADERS += rtems/score/types.h
+include_rtems_score_HEADERS += rtems/score/cpuatomic.h
 
 noinst_LIBRARIES = libscorecpu.a
 libscorecpu_a_SOURCES = cpu.c cpu_asm.S
diff --git a/cpukit/score/cpu/bfin/preinstall.am b/cpukit/score/cpu/bfin/preinstall.am
index 6a665be..459b5b1 100644
--- a/cpukit/score/cpu/bfin/preinstall.am
+++ b/cpukit/score/cpu/bfin/preinstall.am
@@ -60,3 +60,6 @@ $(PROJECT_INCLUDE)/rtems/score/types.h: rtems/score/types.h $(PROJECT_INCLUDE)/r
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/types.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/types.h
 
+$(PROJECT_INCLUDE)/rtems/score/cpuatomic.h: rtems/score/cpuatomic.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/cpuatomic.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/cpuatomic.h
diff --git a/cpukit/score/cpu/bfin/rtems/score/cpuatomic.h b/cpukit/score/cpu/bfin/rtems/score/cpuatomic.h
new file mode 100644
index 0000000..bcf29bf
--- /dev/null
+++ b/cpukit/score/cpu/bfin/rtems/score/cpuatomic.h
@@ -0,0 +1,40 @@
+/**
+ * @file  rtems/score/cpuatomic.h
+ * 
+ * This include file implements the atomic operations for bfin and defines 
+ * atomic data types which are used by the atomic operations API file. This
+ * file should use fixed name cpuatomic.h and should be included in atomic
+ * operations API file atomic.h. If the architecture works at the UP mode it
+ * will use a generic atomic ops using disable/enable-IRQ simulated. If the
+ * the architecture works at SMP mode, most of the parts of implementations
+ * are imported from FreeBSD kernel.
+ */
+
+#ifndef _RTEMS_SCORE_ATOMIC_CPU_H
+#define _RTEMS_SCORE_ATOMIC_CPU_H
+
+#include <rtems/score/genericcpuatomic.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @defgroup RTEMS atomic implementation
+ *
+ */
+
+/**@{*/
+
+#if !defined(RTEMS_SMP)
+#include <rtems/score/genericatomicops.h>
+#else
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+/**@}*/
+#endif
+/*  end of include file */
diff --git a/cpukit/score/cpu/h8300/Makefile.am b/cpukit/score/cpu/h8300/Makefile.am
index 5a3a8cc..db04025 100644
--- a/cpukit/score/cpu/h8300/Makefile.am
+++ b/cpukit/score/cpu/h8300/Makefile.am
@@ -7,6 +7,7 @@ include_rtems_scoredir = $(includedir)/rtems/score
 include_rtems_score_HEADERS = rtems/score/cpu.h
 include_rtems_score_HEADERS += rtems/score/h8300.h
 include_rtems_score_HEADERS += rtems/score/types.h
+include_rtems_score_HEADERS += rtems/score/cpuatomic.h
 
 noinst_LIBRARIES = libscorecpu.a
 libscorecpu_a_SOURCES = cpu.c cpu_asm.S
diff --git a/cpukit/score/cpu/h8300/preinstall.am b/cpukit/score/cpu/h8300/preinstall.am
index c3fb644..0a4032f 100644
--- a/cpukit/score/cpu/h8300/preinstall.am
+++ b/cpukit/score/cpu/h8300/preinstall.am
@@ -39,3 +39,6 @@ $(PROJECT_INCLUDE)/rtems/score/types.h: rtems/score/types.h $(PROJECT_INCLUDE)/r
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/types.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/types.h
 
+$(PROJECT_INCLUDE)/rtems/score/cpuatomic.h: rtems/score/cpuatomic.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/cpuatomic.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/cpuatomic.h
diff --git a/cpukit/score/cpu/h8300/rtems/score/cpuatomic.h b/cpukit/score/cpu/h8300/rtems/score/cpuatomic.h
new file mode 100644
index 0000000..dadd6e2
--- /dev/null
+++ b/cpukit/score/cpu/h8300/rtems/score/cpuatomic.h
@@ -0,0 +1,40 @@
+/**
+ * @file  rtems/score/cpuatomic.h
+ * 
+ * This include file implements the atomic operations for h8300 and defines 
+ * atomic data types which are used by the atomic operations API file. This
+ * file should use fixed name cpuatomic.h and should be included in atomic
+ * operations API file atomic.h. If the architecture works at the UP mode it
+ * will use a generic atomic ops using disable/enable-IRQ simulated. If the
+ * the architecture works at SMP mode, most of the parts of implementations
+ * are imported from FreeBSD kernel.
+ */
+
+#ifndef _RTEMS_SCORE_ATOMIC_CPU_H
+#define _RTEMS_SCORE_ATOMIC_CPU_H
+
+#include <rtems/score/genericcpuatomic.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @defgroup RTEMS atomic implementation
+ *
+ */
+
+/**@{*/
+
+#if !defined(RTEMS_SMP)
+#include <rtems/score/genericatomicops.h>
+#else
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+/**@}*/
+#endif
+/*  end of include file */
diff --git a/cpukit/score/cpu/lm32/Makefile.am b/cpukit/score/cpu/lm32/Makefile.am
index c03e11c..51be260 100644
--- a/cpukit/score/cpu/lm32/Makefile.am
+++ b/cpukit/score/cpu/lm32/Makefile.am
@@ -8,6 +8,7 @@ include_rtems_score_HEADERS = rtems/score/cpu.h
 include_rtems_score_HEADERS += rtems/score/lm32.h
 include_rtems_score_HEADERS += rtems/score/cpu_asm.h
 include_rtems_score_HEADERS += rtems/score/types.h
+include_rtems_score_HEADERS += rtems/score/cpuatomic.h
 
 noinst_LIBRARIES = libscorecpu.a
 libscorecpu_a_SOURCES = cpu.c cpu_asm.S irq.c
diff --git a/cpukit/score/cpu/lm32/preinstall.am b/cpukit/score/cpu/lm32/preinstall.am
index 4ea74cd..4138058 100644
--- a/cpukit/score/cpu/lm32/preinstall.am
+++ b/cpukit/score/cpu/lm32/preinstall.am
@@ -43,3 +43,6 @@ $(PROJECT_INCLUDE)/rtems/score/types.h: rtems/score/types.h $(PROJECT_INCLUDE)/r
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/types.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/types.h
 
+$(PROJECT_INCLUDE)/rtems/score/cpuatomic.h: rtems/score/cpuatomic.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/cpuatomic.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/cpuatomic.h
diff --git a/cpukit/score/cpu/lm32/rtems/score/cpuatomic.h b/cpukit/score/cpu/lm32/rtems/score/cpuatomic.h
new file mode 100644
index 0000000..ace04f3
--- /dev/null
+++ b/cpukit/score/cpu/lm32/rtems/score/cpuatomic.h
@@ -0,0 +1,40 @@
+/**
+ * @file  rtems/score/cpuatomic.h
+ * 
+ * This include file implements the atomic operations for lm32 and defines 
+ * atomic data types which are used by the atomic operations API file. This
+ * file should use fixed name cpuatomic.h and should be included in atomic
+ * operations API file atomic.h. If the architecture works at the UP mode it
+ * will use a generic atomic ops using disable/enable-IRQ simulated. If the
+ * the architecture works at SMP mode, most of the parts of implementations
+ * are imported from FreeBSD kernel.
+ */
+
+#ifndef _RTEMS_SCORE_ATOMIC_CPU_H
+#define _RTEMS_SCORE_ATOMIC_CPU_H
+
+#include <rtems/score/genericcpuatomic.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @defgroup RTEMS atomic implementation
+ *
+ */
+
+/**@{*/
+
+#if !defined(RTEMS_SMP)
+#include <rtems/score/genericatomicops.h>
+#else
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+/**@}*/
+#endif
+/*  end of include file */
diff --git a/cpukit/score/cpu/m32c/Makefile.am b/cpukit/score/cpu/m32c/Makefile.am
index 4d63dfd..469df12 100644
--- a/cpukit/score/cpu/m32c/Makefile.am
+++ b/cpukit/score/cpu/m32c/Makefile.am
@@ -10,6 +10,7 @@ include_rtems_score_HEADERS = rtems/score/cpu.h
 include_rtems_score_HEADERS += rtems/score/m32c.h
 include_rtems_score_HEADERS += rtems/score/cpu_asm.h
 include_rtems_score_HEADERS += rtems/score/types.h
+include_rtems_score_HEADERS += rtems/score/cpuatomic.h
 
 noinst_LIBRARIES = libscorecpu.a
 libscorecpu_a_SOURCES = cpu.c cpu_asm.c context_switch.S context_init.c \
diff --git a/cpukit/score/cpu/m32c/preinstall.am b/cpukit/score/cpu/m32c/preinstall.am
index 14cb358..d9e07af 100644
--- a/cpukit/score/cpu/m32c/preinstall.am
+++ b/cpukit/score/cpu/m32c/preinstall.am
@@ -52,3 +52,6 @@ $(PROJECT_INCLUDE)/rtems/score/types.h: rtems/score/types.h $(PROJECT_INCLUDE)/r
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/types.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/types.h
 
+$(PROJECT_INCLUDE)/rtems/score/cpuatomic.h: rtems/score/cpuatomic.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/cpuatomic.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/cpuatomic.h
diff --git a/cpukit/score/cpu/m32c/rtems/score/cpuatomic.h b/cpukit/score/cpu/m32c/rtems/score/cpuatomic.h
new file mode 100644
index 0000000..2c30cef
--- /dev/null
+++ b/cpukit/score/cpu/m32c/rtems/score/cpuatomic.h
@@ -0,0 +1,40 @@
+/**
+ * @file  rtems/score/cpuatomic.h
+ * 
+ * This include file implements the atomic operations for m32c and defines 
+ * atomic data types which are used by the atomic operations API file. This
+ * file should use fixed name cpuatomic.h and should be included in atomic
+ * operations API file atomic.h. If the architecture works at the UP mode it
+ * will use a generic atomic ops using disable/enable-IRQ simulated. If the
+ * the architecture works at SMP mode, most of the parts of implementations
+ * are imported from FreeBSD kernel.
+ */
+
+#ifndef _RTEMS_SCORE_ATOMIC_CPU_H
+#define _RTEMS_SCORE_ATOMIC_CPU_H
+
+#include <rtems/score/genericcpuatomic.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @defgroup RTEMS atomic implementation
+ *
+ */
+
+/**@{*/
+
+#if !defined(RTEMS_SMP)
+#include <rtems/score/genericatomicops.h>
+#else
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+/**@}*/
+#endif
+/*  end of include file */
diff --git a/cpukit/score/cpu/m32r/Makefile.am b/cpukit/score/cpu/m32r/Makefile.am
index 9db2c89..81ee9ac 100644
--- a/cpukit/score/cpu/m32r/Makefile.am
+++ b/cpukit/score/cpu/m32r/Makefile.am
@@ -10,6 +10,7 @@ include_rtems_score_HEADERS = rtems/score/cpu.h
 include_rtems_score_HEADERS += rtems/score/m32r.h
 include_rtems_score_HEADERS += rtems/score/cpu_asm.h
 include_rtems_score_HEADERS += rtems/score/types.h
+include_rtems_score_HEADERS += rtems/score/cpuatomic.h
 
 noinst_LIBRARIES = libscorecpu.a
 libscorecpu_a_SOURCES = cpu.c cpu_asm.c context_switch.S context_init.c
diff --git a/cpukit/score/cpu/m32r/preinstall.am b/cpukit/score/cpu/m32r/preinstall.am
index 2759bc9..d88ec3b 100644
--- a/cpukit/score/cpu/m32r/preinstall.am
+++ b/cpukit/score/cpu/m32r/preinstall.am
@@ -48,3 +48,6 @@ $(PROJECT_INCLUDE)/rtems/score/types.h: rtems/score/types.h $(PROJECT_INCLUDE)/r
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/types.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/types.h
 
+$(PROJECT_INCLUDE)/rtems/score/cpuatomic.h: rtems/score/cpuatomic.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/cpuatomic.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/cpuatomic.h
diff --git a/cpukit/score/cpu/m32r/rtems/score/cpuatomic.h b/cpukit/score/cpu/m32r/rtems/score/cpuatomic.h
new file mode 100644
index 0000000..a0c6bfb
--- /dev/null
+++ b/cpukit/score/cpu/m32r/rtems/score/cpuatomic.h
@@ -0,0 +1,40 @@
+/**
+ * @file  rtems/score/cpuatomic.h
+ * 
+ * This include file implements the atomic operations for m32r and defines 
+ * atomic data types which are used by the atomic operations API file. This
+ * file should use fixed name cpuatomic.h and should be included in atomic
+ * operations API file atomic.h. If the architecture works at the UP mode it
+ * will use a generic atomic ops using disable/enable-IRQ simulated. If the
+ * the architecture works at SMP mode, most of the parts of implementations
+ * are imported from FreeBSD kernel.
+ */
+
+#ifndef _RTEMS_SCORE_ATOMIC_CPU_H
+#define _RTEMS_SCORE_ATOMIC_CPU_H
+
+#include <rtems/score/genericcpuatomic.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @defgroup RTEMS atomic implementation
+ *
+ */
+
+/**@{*/
+
+#if !defined(RTEMS_SMP)
+#include <rtems/score/genericatomicops.h>
+#else
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+/**@}*/
+#endif
+/*  end of include file */
diff --git a/cpukit/score/cpu/m68k/Makefile.am b/cpukit/score/cpu/m68k/Makefile.am
index 5669177..863a071 100644
--- a/cpukit/score/cpu/m68k/Makefile.am
+++ b/cpukit/score/cpu/m68k/Makefile.am
@@ -16,6 +16,7 @@ include_rtems_scoredir = $(includedir)/rtems/score
 include_rtems_score_HEADERS = rtems/score/cpu.h
 include_rtems_score_HEADERS += rtems/score/m68k.h
 include_rtems_score_HEADERS += rtems/score/types.h
+include_rtems_score_HEADERS += rtems/score/cpuatomic.h
 
 libscorecpu_a_SOURCES = cpu.c cpu_asm.S
 libscorecpu_a_SOURCES += m68k-exception-frame-print.c
diff --git a/cpukit/score/cpu/m68k/preinstall.am b/cpukit/score/cpu/m68k/preinstall.am
index a5febe7..a2f0c26 100644
--- a/cpukit/score/cpu/m68k/preinstall.am
+++ b/cpukit/score/cpu/m68k/preinstall.am
@@ -60,3 +60,6 @@ $(PROJECT_INCLUDE)/rtems/score/types.h: rtems/score/types.h $(PROJECT_INCLUDE)/r
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/types.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/types.h
 
+$(PROJECT_INCLUDE)/rtems/score/cpuatomic.h: rtems/score/cpuatomic.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/cpuatomic.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/cpuatomic.h
diff --git a/cpukit/score/cpu/m68k/rtems/score/cpuatomic.h b/cpukit/score/cpu/m68k/rtems/score/cpuatomic.h
new file mode 100644
index 0000000..e01fdbc
--- /dev/null
+++ b/cpukit/score/cpu/m68k/rtems/score/cpuatomic.h
@@ -0,0 +1,40 @@
+/**
+ * @file  rtems/score/cpuatomic.h
+ * 
+ * This include file implements the atomic operations for m68k and defines 
+ * atomic data types which are used by the atomic operations API file. This
+ * file should use fixed name cpuatomic.h and should be included in atomic
+ * operations API file atomic.h. If the architecture works at the UP mode it
+ * will use a generic atomic ops using disable/enable-IRQ simulated. If the
+ * the architecture works at SMP mode, most of the parts of implementations
+ * are imported from FreeBSD kernel.
+ */
+
+#ifndef _RTEMS_SCORE_ATOMIC_CPU_H
+#define _RTEMS_SCORE_ATOMIC_CPU_H
+
+#include <rtems/score/genericcpuatomic.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @defgroup RTEMS atomic implementation
+ *
+ */
+
+/**@{*/
+
+#if !defined(RTEMS_SMP)
+#include <rtems/score/genericatomicops.h>
+#else
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+/**@}*/
+#endif
+/*  end of include file */
diff --git a/cpukit/score/cpu/mips/Makefile.am b/cpukit/score/cpu/mips/Makefile.am
index 6ca30c3..7a06fae 100644
--- a/cpukit/score/cpu/mips/Makefile.am
+++ b/cpukit/score/cpu/mips/Makefile.am
@@ -11,6 +11,7 @@ include_rtems_scoredir = $(includedir)/rtems/score
 include_rtems_score_HEADERS = rtems/score/cpu.h
 include_rtems_score_HEADERS += rtems/score/mips.h
 include_rtems_score_HEADERS += rtems/score/types.h
+include_rtems_score_HEADERS += rtems/score/cpuatomic.h
 
 noinst_LIBRARIES = libscorecpu.a
 libscorecpu_a_SOURCES = cpu.c cpu_asm.S
diff --git a/cpukit/score/cpu/mips/preinstall.am b/cpukit/score/cpu/mips/preinstall.am
index e99c280..5f622d8 100644
--- a/cpukit/score/cpu/mips/preinstall.am
+++ b/cpukit/score/cpu/mips/preinstall.am
@@ -52,3 +52,6 @@ $(PROJECT_INCLUDE)/rtems/score/types.h: rtems/score/types.h $(PROJECT_INCLUDE)/r
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/types.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/types.h
 
+$(PROJECT_INCLUDE)/rtems/score/cpuatomic.h: rtems/score/cpuatomic.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/cpuatomic.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/cpuatomic.h
diff --git a/cpukit/score/cpu/mips/rtems/score/cpuatomic.h b/cpukit/score/cpu/mips/rtems/score/cpuatomic.h
new file mode 100644
index 0000000..09fa51c
--- /dev/null
+++ b/cpukit/score/cpu/mips/rtems/score/cpuatomic.h
@@ -0,0 +1,40 @@
+/**
+ * @file  rtems/score/cpuatomic.h
+ * 
+ * This include file implements the atomic operations for mips and defines 
+ * atomic data types which are used by the atomic operations API file. This
+ * file should use fixed name cpuatomic.h and should be included in atomic
+ * operations API file atomic.h. If the architecture works at the UP mode it
+ * will use a generic atomic ops using disable/enable-IRQ simulated. If the
+ * the architecture works at SMP mode, most of the parts of implementations
+ * are imported from FreeBSD kernel.
+ */
+
+#ifndef _RTEMS_SCORE_ATOMIC_CPU_H
+#define _RTEMS_SCORE_ATOMIC_CPU_H
+
+#include <rtems/score/genericcpuatomic.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @defgroup RTEMS atomic implementation
+ *
+ */
+
+/**@{*/
+
+#if !defined(RTEMS_SMP)
+#include <rtems/score/genericatomicops.h>
+#else
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+/**@}*/
+#endif
+/*  end of include file */
diff --git a/cpukit/score/cpu/moxie/Makefile.am b/cpukit/score/cpu/moxie/Makefile.am
index 931ca06..a4fb31b 100644
--- a/cpukit/score/cpu/moxie/Makefile.am
+++ b/cpukit/score/cpu/moxie/Makefile.am
@@ -10,6 +10,7 @@ include_rtems_HEADERS = rtems/asm.h
 include_rtems_scoredir = $(includedir)/rtems/score
 include_rtems_score_HEADERS = rtems/score/cpu.h rtems/score/moxie.h \
     rtems/score/types.h
+include_rtems_score_HEADERS += rtems/score/cpuatomic.h
 
 noinst_LIBRARIES = libscorecpu.a
 libscorecpu_a_SOURCES = cpu.c moxie-exception-frame-print.c cpu_asm.S
diff --git a/cpukit/score/cpu/moxie/preinstall.am b/cpukit/score/cpu/moxie/preinstall.am
index 62a2390..36623da 100644
--- a/cpukit/score/cpu/moxie/preinstall.am
+++ b/cpukit/score/cpu/moxie/preinstall.am
@@ -39,3 +39,6 @@ $(PROJECT_INCLUDE)/rtems/score/types.h: rtems/score/types.h $(PROJECT_INCLUDE)/r
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/types.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/types.h
 
+$(PROJECT_INCLUDE)/rtems/score/cpuatomic.h: rtems/score/cpuatomic.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/cpuatomic.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/cpuatomic.h
diff --git a/cpukit/score/cpu/moxie/rtems/score/cpuatomic.h b/cpukit/score/cpu/moxie/rtems/score/cpuatomic.h
new file mode 100644
index 0000000..0c5d748
--- /dev/null
+++ b/cpukit/score/cpu/moxie/rtems/score/cpuatomic.h
@@ -0,0 +1,40 @@
+/**
+ * @file  rtems/score/cpuatomic.h
+ * 
+ * This include file implements the atomic operations for moxie and defines 
+ * atomic data types which are used by the atomic operations API file. This
+ * file should use fixed name cpuatomic.h and should be included in atomic
+ * operations API file atomic.h. If the architecture works at the UP mode it
+ * will use a generic atomic ops using disable/enable-IRQ simulated. If the
+ * the architecture works at SMP mode, most of the parts of implementations
+ * are imported from FreeBSD kernel.
+ */
+
+#ifndef _RTEMS_SCORE_ATOMIC_CPU_H
+#define _RTEMS_SCORE_ATOMIC_CPU_H
+
+#include <rtems/score/genericcpuatomic.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @defgroup RTEMS atomic implementation
+ *
+ */
+
+/**@{*/
+
+#if !defined(RTEMS_SMP)
+#include <rtems/score/genericatomicops.h>
+#else
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+/**@}*/
+#endif
+/*  end of include file */
diff --git a/cpukit/score/cpu/nios2/Makefile.am b/cpukit/score/cpu/nios2/Makefile.am
index 25ff46a..27bfb30 100644
--- a/cpukit/score/cpu/nios2/Makefile.am
+++ b/cpukit/score/cpu/nios2/Makefile.am
@@ -16,6 +16,7 @@ include_rtems_score_HEADERS += rtems/score/nios2-utility.h
 include_rtems_score_HEADERS += rtems/score/nios2-count-zeros.h
 include_rtems_score_HEADERS += rtems/score/cpu_asm.h
 include_rtems_score_HEADERS += rtems/score/types.h
+include_rtems_score_HEADERS += rtems/score/cpuatomic.h
 
 noinst_LIBRARIES = libscorecpu.a
 
diff --git a/cpukit/score/cpu/nios2/preinstall.am b/cpukit/score/cpu/nios2/preinstall.am
index 92e75e1..5d1ea5d 100644
--- a/cpukit/score/cpu/nios2/preinstall.am
+++ b/cpukit/score/cpu/nios2/preinstall.am
@@ -51,3 +51,6 @@ $(PROJECT_INCLUDE)/rtems/score/types.h: rtems/score/types.h $(PROJECT_INCLUDE)/r
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/types.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/types.h
 
+$(PROJECT_INCLUDE)/rtems/score/cpuatomic.h: rtems/score/cpuatomic.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/cpuatomic.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/cpuatomic.h
diff --git a/cpukit/score/cpu/nios2/rtems/score/cpuatomic.h b/cpukit/score/cpu/nios2/rtems/score/cpuatomic.h
new file mode 100644
index 0000000..88d7ee5
--- /dev/null
+++ b/cpukit/score/cpu/nios2/rtems/score/cpuatomic.h
@@ -0,0 +1,40 @@
+/**
+ * @file  rtems/score/cpuatomic.h
+ * 
+ * This include file implements the atomic operations for nios2 and defines 
+ * atomic data types which are used by the atomic operations API file. This
+ * file should use fixed name cpuatomic.h and should be included in atomic
+ * operations API file atomic.h. If the architecture works at the UP mode it
+ * will use a generic atomic ops using disable/enable-IRQ simulated. If the
+ * the architecture works at SMP mode, most of the parts of implementations
+ * are imported from FreeBSD kernel.
+ */
+
+#ifndef _RTEMS_SCORE_ATOMIC_CPU_H
+#define _RTEMS_SCORE_ATOMIC_CPU_H
+
+#include <rtems/score/genericcpuatomic.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @defgroup RTEMS atomic implementation
+ *
+ */
+
+/**@{*/
+
+#if !defined(RTEMS_SMP)
+#include <rtems/score/genericatomicops.h>
+#else
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+/**@}*/
+#endif
+/*  end of include file */
diff --git a/cpukit/score/cpu/sh/Makefile.am b/cpukit/score/cpu/sh/Makefile.am
index a524dfc..7eb2297 100644
--- a/cpukit/score/cpu/sh/Makefile.am
+++ b/cpukit/score/cpu/sh/Makefile.am
@@ -8,6 +8,7 @@ include_rtems_score_HEADERS = rtems/score/cpu.h
 include_rtems_score_HEADERS += rtems/score/types.h
 include_rtems_score_HEADERS += rtems/score/sh.h
 include_rtems_score_HEADERS += rtems/score/sh_io.h
+include_rtems_score_HEADERS += rtems/score/cpuatomic.h
 
 noinst_LIBRARIES = libscorecpu.a
 libscorecpu_a_SOURCES = cpu.c context.c
diff --git a/cpukit/score/cpu/sh/preinstall.am b/cpukit/score/cpu/sh/preinstall.am
index b1e4509..631fda1 100644
--- a/cpukit/score/cpu/sh/preinstall.am
+++ b/cpukit/score/cpu/sh/preinstall.am
@@ -43,3 +43,6 @@ $(PROJECT_INCLUDE)/rtems/score/sh_io.h: rtems/score/sh_io.h $(PROJECT_INCLUDE)/r
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/sh_io.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/sh_io.h
 
+$(PROJECT_INCLUDE)/rtems/score/cpuatomic.h: rtems/score/cpuatomic.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/cpuatomic.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/cpuatomic.h
diff --git a/cpukit/score/cpu/sh/rtems/score/cpuatomic.h b/cpukit/score/cpu/sh/rtems/score/cpuatomic.h
new file mode 100644
index 0000000..184bb8b
--- /dev/null
+++ b/cpukit/score/cpu/sh/rtems/score/cpuatomic.h
@@ -0,0 +1,40 @@
+/**
+ * @file  rtems/score/cpuatomic.h
+ * 
+ * This include file implements the atomic operations for SH and defines 
+ * atomic data types which are used by the atomic operations API file. This
+ * file should use fixed name cpuatomic.h and should be included in atomic
+ * operations API file atomic.h. If the architecture works at the UP mode it
+ * will use a generic atomic ops using disable/enable-IRQ simulated. If the
+ * the architecture works at SMP mode, most of the parts of implementations
+ * are imported from FreeBSD kernel.
+ */
+
+#ifndef _RTEMS_SCORE_ATOMIC_CPU_H
+#define _RTEMS_SCORE_ATOMIC_CPU_H
+
+#include <rtems/score/genericcpuatomic.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @defgroup RTEMS atomic implementation
+ *
+ */
+
+/**@{*/
+
+#if !defined(RTEMS_SMP)
+#include <rtems/score/genericatomicops.h>
+#else
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+/**@}*/
+#endif
+/*  end of include file */
diff --git a/cpukit/score/cpu/sparc/Makefile.am b/cpukit/score/cpu/sparc/Makefile.am
index 578ecc6..4bb09c6 100644
--- a/cpukit/score/cpu/sparc/Makefile.am
+++ b/cpukit/score/cpu/sparc/Makefile.am
@@ -7,6 +7,7 @@ include_rtems_scoredir = $(includedir)/rtems/score
 include_rtems_score_HEADERS = rtems/score/sparc.h
 include_rtems_score_HEADERS += rtems/score/cpu.h
 include_rtems_score_HEADERS += rtems/score/types.h
+include_rtems_score_HEADERS += rtems/score/cpuatomic.h
 
 noinst_LIBRARIES = libscorecpu.a
 libscorecpu_a_SOURCES = cpu.c cpu_asm.S
diff --git a/cpukit/score/cpu/sparc/preinstall.am b/cpukit/score/cpu/sparc/preinstall.am
index da9dde1..bd84845 100644
--- a/cpukit/score/cpu/sparc/preinstall.am
+++ b/cpukit/score/cpu/sparc/preinstall.am
@@ -39,3 +39,6 @@ $(PROJECT_INCLUDE)/rtems/score/types.h: rtems/score/types.h $(PROJECT_INCLUDE)/r
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/types.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/types.h
 
+$(PROJECT_INCLUDE)/rtems/score/cpuatomic.h: rtems/score/cpuatomic.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/cpuatomic.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/cpuatomic.h
diff --git a/cpukit/score/cpu/sparc/rtems/score/cpuatomic.h b/cpukit/score/cpu/sparc/rtems/score/cpuatomic.h
new file mode 100644
index 0000000..f4d5d47
--- /dev/null
+++ b/cpukit/score/cpu/sparc/rtems/score/cpuatomic.h
@@ -0,0 +1,40 @@
+/**
+ * @file  rtems/score/cpuatomic.h
+ * 
+ * This include file implements the atomic operations for sparc and defines 
+ * atomic data types which are used by the atomic operations API file. This
+ * file should use fixed name cpuatomic.h and should be included in atomic
+ * operations API file atomic.h. If the architecture works at the UP mode it
+ * will use a generic atomic ops using disable/enable-IRQ simulated. If the
+ * the architecture works at SMP mode, most of the parts of implementations
+ * are imported from FreeBSD kernel.
+ */
+
+#ifndef _RTEMS_SCORE_ATOMIC_CPU_H
+#define _RTEMS_SCORE_ATOMIC_CPU_H
+
+#include <rtems/score/genericcpuatomic.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @defgroup RTEMS atomic implementation
+ *
+ */
+
+/**@{*/
+
+#if !defined(RTEMS_SMP)
+#include <rtems/score/genericatomicops.h>
+#else
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+/**@}*/
+#endif
+/*  end of include file */
diff --git a/cpukit/score/cpu/sparc64/Makefile.am b/cpukit/score/cpu/sparc64/Makefile.am
index 2897a46..02babb4 100644
--- a/cpukit/score/cpu/sparc64/Makefile.am
+++ b/cpukit/score/cpu/sparc64/Makefile.am
@@ -10,6 +10,7 @@ include_rtems_scoredir = $(includedir)/rtems/score
 include_rtems_score_HEADERS = rtems/score/sparc64.h
 include_rtems_score_HEADERS += rtems/score/cpu.h
 include_rtems_score_HEADERS += rtems/score/types.h
+include_rtems_score_HEADERS += rtems/score/cpuatomic.h
 
 noinst_LIBRARIES = libscorecpu.a
 libscorecpu_a_SOURCES = context.S cpu.c
diff --git a/cpukit/score/cpu/sparc64/preinstall.am b/cpukit/score/cpu/sparc64/preinstall.am
index 9c6d5e4..9da645f 100644
--- a/cpukit/score/cpu/sparc64/preinstall.am
+++ b/cpukit/score/cpu/sparc64/preinstall.am
@@ -39,3 +39,6 @@ $(PROJECT_INCLUDE)/rtems/score/types.h: rtems/score/types.h $(PROJECT_INCLUDE)/r
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/types.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/types.h
 
+$(PROJECT_INCLUDE)/rtems/score/cpuatomic.h: rtems/score/cpuatomic.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/cpuatomic.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/cpuatomic.h
diff --git a/cpukit/score/cpu/sparc64/rtems/score/cpuatomic.h b/cpukit/score/cpu/sparc64/rtems/score/cpuatomic.h
new file mode 100644
index 0000000..434fab4
--- /dev/null
+++ b/cpukit/score/cpu/sparc64/rtems/score/cpuatomic.h
@@ -0,0 +1,40 @@
+/**
+ * @file  rtems/score/cpuatomic.h
+ * 
+ * This include file implements the atomic operations for sparc64 and defines 
+ * atomic data types which are used by the atomic operations API file. This
+ * file should use fixed name cpuatomic.h and should be included in atomic
+ * operations API file atomic.h. If the architecture works at the UP mode it
+ * will use a generic atomic ops using disable/enable-IRQ simulated. If the
+ * the architecture works at SMP mode, most of the parts of implementations
+ * are imported from FreeBSD kernel.
+ */
+
+#ifndef _RTEMS_SCORE_ATOMIC_CPU_H
+#define _RTEMS_SCORE_ATOMIC_CPU_H
+
+#include <rtems/score/genericcpuatomic.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @defgroup RTEMS atomic implementation
+ *
+ */
+
+/**@{*/
+
+#if !defined(RTEMS_SMP)
+#include <rtems/score/genericatomicops.h>
+#else
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+/**@}*/
+#endif
+/*  end of include file */
diff --git a/cpukit/score/cpu/v850/Makefile.am b/cpukit/score/cpu/v850/Makefile.am
index 6f1ce67..c873bae 100644
--- a/cpukit/score/cpu/v850/Makefile.am
+++ b/cpukit/score/cpu/v850/Makefile.am
@@ -7,6 +7,7 @@ include_rtems_scoredir = $(includedir)/rtems/score
 include_rtems_score_HEADERS  = rtems/score/cpu.h
 include_rtems_score_HEADERS += rtems/score/v850.h
 include_rtems_score_HEADERS += rtems/score/cpu_asm.h rtems/score/types.h
+include_rtems_score_HEADERS += rtems/score/cpuatomic.h
 
 noinst_LIBRARIES = libscorecpu.a
 libscorecpu_a_SOURCES  = cpu.c
diff --git a/cpukit/score/cpu/v850/preinstall.am b/cpukit/score/cpu/v850/preinstall.am
index c3d98e5..9b1575a 100644
--- a/cpukit/score/cpu/v850/preinstall.am
+++ b/cpukit/score/cpu/v850/preinstall.am
@@ -43,3 +43,6 @@ $(PROJECT_INCLUDE)/rtems/score/types.h: rtems/score/types.h $(PROJECT_INCLUDE)/r
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/types.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/types.h
 
+$(PROJECT_INCLUDE)/rtems/score/cpuatomic.h: rtems/score/cpuatomic.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/cpuatomic.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/cpuatomic.h
diff --git a/cpukit/score/cpu/v850/rtems/score/cpuatomic.h b/cpukit/score/cpu/v850/rtems/score/cpuatomic.h
new file mode 100644
index 0000000..f35bada
--- /dev/null
+++ b/cpukit/score/cpu/v850/rtems/score/cpuatomic.h
@@ -0,0 +1,40 @@
+/**
+ * @file  rtems/score/cpuatomic.h
+ * 
+ * This include file implements the atomic operations for v850 and defines 
+ * atomic data types which are used by the atomic operations API file. This
+ * file should use fixed name cpuatomic.h and should be included in atomic
+ * operations API file atomic.h. If the architecture works at the UP mode it
+ * will use a generic atomic ops using disable/enable-IRQ simulated. If the
+ * the architecture works at SMP mode, most of the parts of implementations
+ * are imported from FreeBSD kernel.
+ */
+
+#ifndef _RTEMS_SCORE_ATOMIC_CPU_H
+#define _RTEMS_SCORE_ATOMIC_CPU_H
+
+#include <rtems/score/genericcpuatomic.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @defgroup RTEMS atomic implementation
+ *
+ */
+
+/**@{*/
+
+#if !defined(RTEMS_SMP)
+#include <rtems/score/genericatomicops.h>
+#else
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+/**@}*/
+#endif
+/*  end of include file */
-- 
1.7.1




More information about the devel mailing list