Displaying 1 result from an estimated 1 matches for "sem_init_sysv".
2010 Aug 10
1
semget() failed
...n't
understand OS/2 semget(). RPL/2 uses POSIX semaphores. I have written a
minimal library that emulates POSIX semaphores with SysV ones. I have
tested this library on several Unix systems without any trouble.
On OS/2, semget() always returns -1 and I don't understand my mistake.
int
sem_init_SysV(sem_t *semaphore, int shared, unsigned int valeur)
{
int ios;
union semun argument;
if (shared != 0)
{
return(ENOSYS);
}
(*semaphore) = semget(IPC_PRIVATE, 1, IPC_CREAT | IPC_EXCL | SEM_R
| SEM_A);
if ((*semaphore) == -1)
{
// A...