11 Aug 2010 12:35
semget() always fails
<joel.bertrand <at> systella.fr>
2010-08-11 10:35:11 GMT
2010-08-11 10:35:11 GMT
Hello,
I have written a library that emulates Poxis semaphores with SystemV
ones. To do that, I have used semget() function that always fails.
Configuration : eCS 2.0 + EMX 0.9d, gcc-4.4.4 (and all GNU tools).
Source code :
#ifndef UNION_SEMUN
union semun
{
int val;
struct semid_ds *buf;
unsigned short *array;
struct seminfo *__buf;
};
#endif
int
sem_init_SysV(sem_t *semaphore, int shared, unsigned int valeur)
{
int ios;
union semun argument;
if (shared != 0)
{
return(ENOSYS);
}
(Continue reading)
RSS Feed