search for: sem_a

Displaying 1 result from an estimated 1 matches for "sem_a".

Did you mean: sem_
2010 Aug 10
1
semget() failed
...on'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) { // Always true with OS/2 (libc 0.6.3) return(EINVAL); } argument.val = valeur; ios = semctl((*semaphore), 0, SETVAL, argument); return(ios); } Any explanation ? Thanks in advance, JKB