summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/percpu.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-06-29 00:34:12 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-06-29 00:34:12 +0000
commit11e8bc5f0fa2d9485908874dbfe9cd65c1aec477 (patch)
tree8e21888988f4c1e22aff26478e3f158e60c444c6 /cpukit/score/src/percpu.c
parent2010-06-28 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-11e8bc5f0fa2d9485908874dbfe9cd65c1aec477.tar.bz2
2010-06-28 Joel Sherrill <joel.sherrill@oarcorp.com>
PR 1573/cpukit * configure.ac, posix/src/killinfo.c, posix/src/psignalclearprocesssignals.c, posix/src/psignalsetprocesssignals.c, posix/src/psignalunblockthread.c, posix/src/pthreadcreate.c, posix/src/pthreadkill.c, posix/src/pthreadsigmask.c, rtems/src/signalsend.c, rtems/src/taskmode.c, score/Makefile.am, score/preinstall.am, score/include/rtems/system.h, score/include/rtems/score/context.h, score/include/rtems/score/isr.h, score/include/rtems/score/thread.h, score/src/isr.c, score/src/isrthreaddispatch.c, score/src/thread.c, score/src/threaddispatch.c, score/src/threadloadenv.c: Add a per cpu data structure which contains the information required by RTEMS for each CPU core. This encapsulates information such as thread executing, heir, idle and dispatch needed. * score/include/rtems/score/percpu.h, score/src/percpu.c: New files.
Diffstat (limited to 'cpukit/score/src/percpu.c')
-rw-r--r--cpukit/score/src/percpu.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/cpukit/score/src/percpu.c b/cpukit/score/src/percpu.c
new file mode 100644
index 0000000000..4c719af6db
--- /dev/null
+++ b/cpukit/score/src/percpu.c
@@ -0,0 +1,29 @@
+/*
+ * COPYRIGHT (c) 1989-2010.
+ * 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.
+ *
+ * $Id$
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/system.h>
+#include <rtems/score/thread.h>
+#include <rtems/score/percpu.h>
+#include <rtems/score/wkspace.h>
+#include <rtems/score/wkspace.h>
+#include <rtems/config.h>
+#include <string.h>
+
+/*
+ * On single core systems, we can efficiently directly access a single
+ * statically allocated per cpu structure. And the fields are initialized
+ * as individual elements just like it has always been done.
+ */
+Per_CPU_Control _Per_CPU_Information;