summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1997-04-22 19:57:02 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1997-04-22 19:57:02 +0000
commitf254555238e0c9dcd2cd53c08d01ed5418fba47d (patch)
tree2ba08412a1007249276713842ef4cffd6c2a7d12
parentupdated with new license information per Tony Bennett. (diff)
downloadrtems-f254555238e0c9dcd2cd53c08d01ed5418fba47d.tar.bz2
multiprocessing fixed on linux by fixing cpu.c so correct form of
semctl was being invoked.
-rw-r--r--c/src/exec/score/cpu/unix/cpu.c7
-rw-r--r--cpukit/score/cpu/unix/cpu.c7
2 files changed, 8 insertions, 6 deletions
diff --git a/c/src/exec/score/cpu/unix/cpu.c b/c/src/exec/score/cpu/unix/cpu.c
index 0ad145757b..836268aa9e 100644
--- a/c/src/exec/score/cpu/unix/cpu.c
+++ b/c/src/exec/score/cpu/unix/cpu.c
@@ -24,7 +24,7 @@
#define __EXTENSIONS__
#endif
-#if defined(linux)
+#if defined(__linux__)
#define MALLOC_0_RETURNS_NULL
#endif
@@ -873,9 +873,10 @@ void _CPU_SHM_Init(
help.val = 1;
status = semctl( _CPU_SHM_Semid, i, SETVAL, help );
-#endif
-#if defined(hpux)
+#elif defined(hpux) || defined(__linux__)
status = semctl( _CPU_SHM_Semid, i, SETVAL, 1 );
+#else
+#error "Not a supported unix variant"
#endif
fix_syscall_errno(); /* in case of newlib */
diff --git a/cpukit/score/cpu/unix/cpu.c b/cpukit/score/cpu/unix/cpu.c
index 0ad145757b..836268aa9e 100644
--- a/cpukit/score/cpu/unix/cpu.c
+++ b/cpukit/score/cpu/unix/cpu.c
@@ -24,7 +24,7 @@
#define __EXTENSIONS__
#endif
-#if defined(linux)
+#if defined(__linux__)
#define MALLOC_0_RETURNS_NULL
#endif
@@ -873,9 +873,10 @@ void _CPU_SHM_Init(
help.val = 1;
status = semctl( _CPU_SHM_Semid, i, SETVAL, help );
-#endif
-#if defined(hpux)
+#elif defined(hpux) || defined(__linux__)
status = semctl( _CPU_SHM_Semid, i, SETVAL, 1 );
+#else
+#error "Not a supported unix variant"
#endif
fix_syscall_errno(); /* in case of newlib */