forked from Imagelibrary/rtems
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.
This commit is contained in:
@@ -38,7 +38,10 @@ RTEMS_CHECK_MULTIPROCESSING(RTEMS_BSP)
|
|||||||
RTEMS_CHECK_POSIX_API(RTEMS_BSP)
|
RTEMS_CHECK_POSIX_API(RTEMS_BSP)
|
||||||
RTEMS_CHECK_ITRON_API(RTEMS_BSP)
|
RTEMS_CHECK_ITRON_API(RTEMS_BSP)
|
||||||
|
|
||||||
RTEMS_CHECK_SYSV_UNIX
|
# The only use of System V IPC is the UNIX port when multiprocessing.
|
||||||
|
if test "$HAS_MP" = "yes"; then
|
||||||
|
RTEMS_CHECK_SYSV_UNIX
|
||||||
|
fi
|
||||||
|
|
||||||
# find all the Executive Makefiles
|
# find all the Executive Makefiles
|
||||||
RTEMS_CHECK_MAKEFILE($RTEMS_CPU)
|
RTEMS_CHECK_MAKEFILE($RTEMS_CPU)
|
||||||
|
|||||||
@@ -29,9 +29,11 @@
|
|||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <sys/ipc.h>
|
#include <sys/ipc.h>
|
||||||
#include <sys/shm.h>
|
#include <sys/shm.h>
|
||||||
#include <sys/sem.h>
|
#include <sys/sem.h>
|
||||||
|
#endif
|
||||||
#include <string.h> /* memset */
|
#include <string.h> /* memset */
|
||||||
|
|
||||||
#ifndef SA_RESTART
|
#ifndef SA_RESTART
|
||||||
@@ -922,8 +924,10 @@ void _CPU_Stop_clock( void )
|
|||||||
setitimer(ITIMER_REAL, &new, 0);
|
setitimer(ITIMER_REAL, &new, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern void fix_syscall_errno( void );
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
int _CPU_SHM_Semid;
|
int _CPU_SHM_Semid;
|
||||||
extern void fix_syscall_errno( void );
|
|
||||||
|
|
||||||
void _CPU_SHM_Init(
|
void _CPU_SHM_Init(
|
||||||
unsigned32 maximum_nodes,
|
unsigned32 maximum_nodes,
|
||||||
@@ -1015,12 +1019,14 @@ void _CPU_SHM_Init(
|
|||||||
*shm_length = shm_size;
|
*shm_length = shm_size;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int _CPU_Get_pid( void )
|
int _CPU_Get_pid( void )
|
||||||
{
|
{
|
||||||
return getpid();
|
return getpid();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
/*
|
/*
|
||||||
* Define this to use signals for MPCI shared memory driver.
|
* Define this to use signals for MPCI shared memory driver.
|
||||||
* If undefined, the shared memory driver will poll from the
|
* If undefined, the shared memory driver will poll from the
|
||||||
@@ -1108,3 +1114,4 @@ void _CPU_SHM_Unlock(
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -1061,6 +1061,8 @@ void _CPU_Start_clock(
|
|||||||
|
|
||||||
void _CPU_Stop_clock( void );
|
void _CPU_Stop_clock( void );
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
|
|
||||||
void _CPU_SHM_Init(
|
void _CPU_SHM_Init(
|
||||||
unsigned32 maximum_nodes,
|
unsigned32 maximum_nodes,
|
||||||
boolean is_master_node,
|
boolean is_master_node,
|
||||||
@@ -1084,6 +1086,7 @@ void _CPU_SHM_Lock(
|
|||||||
void _CPU_SHM_Unlock(
|
void _CPU_SHM_Unlock(
|
||||||
int semaphore
|
int semaphore
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,9 +29,11 @@
|
|||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <sys/ipc.h>
|
#include <sys/ipc.h>
|
||||||
#include <sys/shm.h>
|
#include <sys/shm.h>
|
||||||
#include <sys/sem.h>
|
#include <sys/sem.h>
|
||||||
|
#endif
|
||||||
#include <string.h> /* memset */
|
#include <string.h> /* memset */
|
||||||
|
|
||||||
#ifndef SA_RESTART
|
#ifndef SA_RESTART
|
||||||
@@ -922,8 +924,10 @@ void _CPU_Stop_clock( void )
|
|||||||
setitimer(ITIMER_REAL, &new, 0);
|
setitimer(ITIMER_REAL, &new, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern void fix_syscall_errno( void );
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
int _CPU_SHM_Semid;
|
int _CPU_SHM_Semid;
|
||||||
extern void fix_syscall_errno( void );
|
|
||||||
|
|
||||||
void _CPU_SHM_Init(
|
void _CPU_SHM_Init(
|
||||||
unsigned32 maximum_nodes,
|
unsigned32 maximum_nodes,
|
||||||
@@ -1015,12 +1019,14 @@ void _CPU_SHM_Init(
|
|||||||
*shm_length = shm_size;
|
*shm_length = shm_size;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int _CPU_Get_pid( void )
|
int _CPU_Get_pid( void )
|
||||||
{
|
{
|
||||||
return getpid();
|
return getpid();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
/*
|
/*
|
||||||
* Define this to use signals for MPCI shared memory driver.
|
* Define this to use signals for MPCI shared memory driver.
|
||||||
* If undefined, the shared memory driver will poll from the
|
* If undefined, the shared memory driver will poll from the
|
||||||
@@ -1108,3 +1114,4 @@ void _CPU_SHM_Unlock(
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -1061,6 +1061,8 @@ void _CPU_Start_clock(
|
|||||||
|
|
||||||
void _CPU_Stop_clock( void );
|
void _CPU_Stop_clock( void );
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
|
|
||||||
void _CPU_SHM_Init(
|
void _CPU_SHM_Init(
|
||||||
unsigned32 maximum_nodes,
|
unsigned32 maximum_nodes,
|
||||||
boolean is_master_node,
|
boolean is_master_node,
|
||||||
@@ -1084,6 +1086,7 @@ void _CPU_SHM_Lock(
|
|||||||
void _CPU_SHM_Unlock(
|
void _CPU_SHM_Unlock(
|
||||||
int semaphore
|
int semaphore
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user