diff options
author | WeiY <wei.a.yang@gmail.com> | 2013-04-24 00:34:16 +0800 |
---|---|---|
committer | Gedare Bloom <gedare@rtems.org> | 2013-05-01 10:28:48 -0400 |
commit | 9b605b28b497f398682a8ffd673f6860340957f8 (patch) | |
tree | 94e64336479fda8c8a6391357ab2894afb4a8d63 /cpukit/score/cpu/sparc | |
parent | Implement a generic atomic ops for all UP mode architectures with disable/ena... (diff) | |
download | rtems-9b605b28b497f398682a8ffd673f6860340957f8.tar.bz2 |
Using the generic atomic ops to implement UP mode atomic for all architectures. SMP atomic port will be later.
Diffstat (limited to '')
-rw-r--r-- | cpukit/score/cpu/sparc/Makefile.am | 1 | ||||
-rw-r--r-- | cpukit/score/cpu/sparc/preinstall.am | 3 | ||||
-rw-r--r-- | cpukit/score/cpu/sparc/rtems/score/cpuatomic.h | 40 | ||||
-rw-r--r-- | cpukit/score/cpu/sparc64/Makefile.am | 1 | ||||
-rw-r--r-- | cpukit/score/cpu/sparc64/preinstall.am | 3 | ||||
-rw-r--r-- | cpukit/score/cpu/sparc64/rtems/score/cpuatomic.h | 40 |
6 files changed, 88 insertions, 0 deletions
diff --git a/cpukit/score/cpu/sparc/Makefile.am b/cpukit/score/cpu/sparc/Makefile.am index 578ecc68a7..4bb09c6b56 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 da9dde121f..bd84845939 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 0000000000..73ff393ca7 --- /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 2897a46dc7..02babb4c60 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 9c6d5e4296..9da645f59f 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 0000000000..25a4de1352 --- /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 */ |