summaryrefslogtreecommitdiffstats
path: root/cpukit/score/cpu/nios2
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score/cpu/nios2')
-rw-r--r--cpukit/score/cpu/nios2/Makefile.am1
-rw-r--r--cpukit/score/cpu/nios2/preinstall.am3
-rw-r--r--cpukit/score/cpu/nios2/rtems/score/cpuatomic.h40
3 files changed, 44 insertions, 0 deletions
diff --git a/cpukit/score/cpu/nios2/Makefile.am b/cpukit/score/cpu/nios2/Makefile.am
index 25ff46abfd..27bfb3065e 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 92e75e1a0e..5d1ea5df9c 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 0000000000..a97d5b1dfb
--- /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 */