summaryrefslogtreecommitdiffstats
path: root/cpukit/score/cpu/unix/cpu.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-16 16:07:17 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-16 16:07:17 +0000
commitc09454282bf05f46d967af5ed5fa9897cccca58a (patch)
treea1c2d666fb7006a5da49cbec937ecd4002a4b354 /cpukit/score/cpu/unix/cpu.c
parentFixed so can be included multiple times in the executive source. (diff)
downloadrtems-c09454282bf05f46d967af5ed5fa9897cccca58a.tar.bz2
Only check for System V IPC if multiprocessing is enabled. The unix
port only uses System V IPC for shared memory and semaphores to communicate between nodes in a multiprocessor configuration. If you disable multiprocessing, then this code should be unused. Thus systems like Cygwin which are POSIX but do not support System V IPC should not work.
Diffstat (limited to '')
-rw-r--r--cpukit/score/cpu/unix/cpu.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/cpukit/score/cpu/unix/cpu.c b/cpukit/score/cpu/unix/cpu.c
index d29bb03963..7f9f9c8047 100644
--- a/cpukit/score/cpu/unix/cpu.c
+++ b/cpukit/score/cpu/unix/cpu.c
@@ -29,9 +29,11 @@
#include <sys/time.h>
#include <errno.h>
#include <unistd.h>
+#if defined(RTEMS_MULTIPROCESSING)
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/sem.h>
+#endif
#include <string.h> /* memset */
#ifndef SA_RESTART
@@ -922,8 +924,10 @@ void _CPU_Stop_clock( void )
setitimer(ITIMER_REAL, &new, 0);
}
+extern void fix_syscall_errno( void );
+
+#if defined(RTEMS_MULTIPROCESSING)
int _CPU_SHM_Semid;
-extern void fix_syscall_errno( void );
void _CPU_SHM_Init(
unsigned32 maximum_nodes,
@@ -1015,12 +1019,14 @@ void _CPU_SHM_Init(
*shm_length = shm_size;
}
+#endif
int _CPU_Get_pid( void )
{
return getpid();
}
+#if defined(RTEMS_MULTIPROCESSING)
/*
* Define this to use signals for MPCI shared memory driver.
* If undefined, the shared memory driver will poll from the
@@ -1108,3 +1114,4 @@ void _CPU_SHM_Unlock(
}
}
+#endif