summaryrefslogtreecommitdiffstats
path: root/c/src/exec/score/cpu/unix/cpu.h
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1995-09-27 20:53:58 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1995-09-27 20:53:58 +0000
commit37f4c2d99fbf09142aeafe3a9908a81e283f8186 (patch)
tree04dc487b28113dc17f1c3c9ab2241390b4ed95ea /c/src/exec/score/cpu/unix/cpu.h
parentFixed typo (diff)
downloadrtems-37f4c2d99fbf09142aeafe3a9908a81e283f8186.tar.bz2
Modified UNIX simulator port so all references to native unix
stuff is in the executive source proper in the file cpu.c. This should help avoid conflicts between RTEMS POSIX files and UNIX files.
Diffstat (limited to 'c/src/exec/score/cpu/unix/cpu.h')
-rw-r--r--c/src/exec/score/cpu/unix/cpu.h54
1 files changed, 48 insertions, 6 deletions
diff --git a/c/src/exec/score/cpu/unix/cpu.h b/c/src/exec/score/cpu/unix/cpu.h
index d7ff311af1..b4b34d4eff 100644
--- a/c/src/exec/score/cpu/unix/cpu.h
+++ b/c/src/exec/score/cpu/unix/cpu.h
@@ -31,6 +31,8 @@ extern "C" {
#include <rtems/score/unixtypes.h>
#endif
+#include <rtems/score/unixsize.h>
+
#if defined(solaris2)
#undef _POSIX_C_SOURCE
#define _POSIX_C_SOURCE 3
@@ -42,10 +44,6 @@ extern "C" {
#define MALLOC_0_RETURNS_NULL
#endif
-#include <unistd.h>
-#include <setjmp.h>
-#include <signal.h>
-
/* conditional compilation parameters */
/*
@@ -431,9 +429,17 @@ extern "C" {
* a debugger such as gdb. But that is another problem.
*/
+/*
+ * This is really just the area for the following fields.
+ *
+ * jmp_buf regs;
+ * sigset_t isr_level;
+ *
+ * Doing it this way avoids conflicts between the native stuff and the
+ * RTEMS stuff.
+ */
typedef struct {
- jmp_buf regs;
- sigset_t isr_level;
+ char Area[ CPU_CONTEXT_SIZE_IN_BYTES ];
} Context_Control;
typedef struct {
@@ -968,6 +974,42 @@ static inline unsigned int CPU_swap_u32(
return( swapped );
}
+/*
+ * Special Purpose Routines to hide the use of UNIX system calls.
+ */
+
+int _CPU_Get_clock_vector( void );
+
+void _CPU_Start_clock(
+ int microseconds
+);
+
+void _CPU_Stop_clock( void );
+
+void _CPU_SHM_Init(
+ unsigned32 maximum_nodes,
+ boolean is_master_node,
+ void **shm_address,
+ unsigned32 *shm_length
+);
+
+int _CPU_Get_pid( void );
+
+int _CPU_SHM_Get_vector( void );
+
+void _CPU_SHM_Send_interrupt(
+ int pid,
+ int vector
+);
+
+void _CPU_SHM_Lock(
+ int semaphore
+);
+
+void _CPU_SHM_Unlock(
+ int semaphore
+);
+
#ifdef __cplusplus
}
#endif