summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src/modes.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2012-02-02 16:57:42 -0600
committerJoel Sherrill <joel.sherrill@oarcorp.com>2012-02-02 16:57:42 -0600
commit5d44355937fddc26485ac691a4ceba3f1c169ecf (patch)
treea776fae3b49e32ddca1fce59c128e1736c4cf203 /cpukit/rtems/src/modes.c
parentMerge remote branch 'upstream/master' (diff)
downloadrtems-5d44355937fddc26485ac691a4ceba3f1c169ecf.tar.bz2
PR 1991/cpukit - attr.c (really mode code) warning rework
This PR was about a warning for no previous prototype for rtems_interrupt_level_attribute. This method exists (like a few others) to have real bodies for Classic API services implemented as macros. These macros are not available from anything but C and C++. The most explicit use was in the Ada binding but these would be needed from assembly language or any other non-C based language. On top of needing a prototype, the methods were misnamed. They were related to modes. This renames them, moves the file, fixes test code, etc.
Diffstat (limited to 'cpukit/rtems/src/modes.c')
-rw-r--r--cpukit/rtems/src/modes.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/cpukit/rtems/src/modes.c b/cpukit/rtems/src/modes.c
new file mode 100644
index 0000000000..0c51281177
--- /dev/null
+++ b/cpukit/rtems/src/modes.c
@@ -0,0 +1,35 @@
+/**
+ * @file
+ *
+ * @body Body for Mode Routines Implemented as Macros
+ *
+ * This file contains bodies for Mode Macros which are
+ * needed by language bindings other than C and C++.
+ */
+
+/*
+ * COPYRIGHT (c) 1989-2012.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/system.h>
+#include <rtems/rtems/tasks.h>
+#include <rtems/score/stack.h>
+#include <rtems/rtems/modes.h>
+
+const uint32_t rtems_interrupt_mask = RTEMS_INTERRUPT_MASK;
+
+Modes_Control rtems_interrupt_level_body(
+ uint32_t level
+)
+{
+ return RTEMS_INTERRUPT_LEVEL(level);
+}