version 1.239, 2014/04/23 13:43:01
|
version 1.242, 2014/04/29 14:41:43
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.1.17 |
RPL/2 (R) version 4.1.18 |
Copyright (C) 1989-2014 Dr. BERTRAND Joël |
Copyright (C) 1989-2014 Dr. BERTRAND Joël |
|
|
This file is part of RPL/2. |
This file is part of RPL/2. |
Line 110
|
Line 110
|
# include <sys/shm.h> |
# include <sys/shm.h> |
# endif |
# endif |
|
|
# ifndef __RPLCAS |
# ifndef IPCS_SYSV |
# ifndef IPCS_SYSV |
# include <semaphore.h> |
# include <semaphore.h> |
# else |
# else |
# include <sys/ipc.h> |
# include <sys/ipc.h> |
# include <sys/sem.h> |
# include <sys/sem.h> |
|
|
|
# ifdef OS2 |
|
# define INCL_DOSSEMAPHORES |
|
# define INCL_DOSMEMMGR |
|
# define INCL_DOSERRORS |
|
# include <os2.h> |
|
|
|
typedef struct _OS2SEM |
|
{ |
|
HMTX hmtx; |
|
HEV hev; |
|
ULONG shared; |
|
ULONG *cnt; |
|
ULONG *nopened; |
|
ULONG allocated; |
|
} sem_t; |
|
# else // IPCS_SYSV |
|
typedef struct |
|
{ |
|
int sem; |
|
int alloue; |
|
unsigned char *path; |
|
pid_t pid; |
|
pthread_t tid; |
|
} sem_t; |
|
# endif |
|
|
|
# ifndef SEM_FAILED |
|
# define SEM_FAILED NULL |
|
# endif |
|
|
|
|
# ifdef OS2 |
|
# define INCL_DOSSEMAPHORES |
|
# define INCL_DOSMEMMGR |
|
# define INCL_DOSERRORS |
|
# include <os2.h> |
|
|
|
typedef struct _OS2SEM |
|
{ |
|
HMTX hmtx; |
|
HEV hev; |
|
ULONG shared; |
|
ULONG *cnt; |
|
ULONG *nopened; |
|
ULONG allocated; |
|
} sem_t; |
|
# else // IPCS_SYSV |
|
typedef struct |
|
{ |
|
int sem; |
|
int alloue; |
|
unsigned char *path; |
|
pid_t pid; |
|
pthread_t tid; |
|
} sem_t; |
|
# endif |
|
|
|
# ifndef SEM_FAILED |
|
# define SEM_FAILED NULL |
|
# endif |
|
|
|
# ifndef __RPLCAS |
sem_t *sem_open_SysV(const char *nom, int oflag, ...); |
sem_t *sem_open_SysV(const char *nom, int oflag, ...); |
int sem_init_SysV(sem_t *sem, int shared, unsigned int value); |
int sem_init_SysV(sem_t *sem, int shared, unsigned int value); |
int sem_close_SysV(sem_t *sem); |
int sem_close_SysV(sem_t *sem); |
Line 459 union semun
|
Line 459 union semun
|
#ifndef RPLARGS |
#ifndef RPLARGS |
# ifdef SEMAPHORES_NOMMES |
# ifdef SEMAPHORES_NOMMES |
# define LONGUEUR_NOM_SEMAPHORE 64 |
# define LONGUEUR_NOM_SEMAPHORE 64 |
# endif |
|
|
|
# ifdef SEMAPHORES_NOMMES |
|
# define __PTR__ * |
# define __PTR__ * |
# else |
# else |
# define __PTR__ |
# define __PTR__ |