forked from Imagelibrary/rtems
multiprocessing fixed on linux by fixing cpu.c so correct form of
semctl was being invoked.
This commit is contained in:
@@ -24,7 +24,7 @@
|
|||||||
#define __EXTENSIONS__
|
#define __EXTENSIONS__
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(linux)
|
#if defined(__linux__)
|
||||||
#define MALLOC_0_RETURNS_NULL
|
#define MALLOC_0_RETURNS_NULL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -873,9 +873,10 @@ void _CPU_SHM_Init(
|
|||||||
|
|
||||||
help.val = 1;
|
help.val = 1;
|
||||||
status = semctl( _CPU_SHM_Semid, i, SETVAL, help );
|
status = semctl( _CPU_SHM_Semid, i, SETVAL, help );
|
||||||
#endif
|
#elif defined(hpux) || defined(__linux__)
|
||||||
#if defined(hpux)
|
|
||||||
status = semctl( _CPU_SHM_Semid, i, SETVAL, 1 );
|
status = semctl( _CPU_SHM_Semid, i, SETVAL, 1 );
|
||||||
|
#else
|
||||||
|
#error "Not a supported unix variant"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
fix_syscall_errno(); /* in case of newlib */
|
fix_syscall_errno(); /* in case of newlib */
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
#define __EXTENSIONS__
|
#define __EXTENSIONS__
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(linux)
|
#if defined(__linux__)
|
||||||
#define MALLOC_0_RETURNS_NULL
|
#define MALLOC_0_RETURNS_NULL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -873,9 +873,10 @@ void _CPU_SHM_Init(
|
|||||||
|
|
||||||
help.val = 1;
|
help.val = 1;
|
||||||
status = semctl( _CPU_SHM_Semid, i, SETVAL, help );
|
status = semctl( _CPU_SHM_Semid, i, SETVAL, help );
|
||||||
#endif
|
#elif defined(hpux) || defined(__linux__)
|
||||||
#if defined(hpux)
|
|
||||||
status = semctl( _CPU_SHM_Semid, i, SETVAL, 1 );
|
status = semctl( _CPU_SHM_Semid, i, SETVAL, 1 );
|
||||||
|
#else
|
||||||
|
#error "Not a supported unix variant"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
fix_syscall_errno(); /* in case of newlib */
|
fix_syscall_errno(); /* in case of newlib */
|
||||||
|
|||||||
Reference in New Issue
Block a user