Subj : Re: pthreads and semaphore - Beginer question To : comp.programming.threads From : plinius Date : Fri Aug 05 2005 05:33 pm Hi, I did call sem_init: sem_init(&lampion,NULL,0); Casting the pointer is ugly. Better to use a real 'void *' and pass its address to pthread_join, you can then cast the 'void *'. The problem is that a 'void *' might not be the same size or same format as an 'int'. Casting the address doesn't give the compiler the ability to fix that. -> Yes, but I used this in other multithreaded programs, and never gave any problem. I found it in pthread-primers (a book). Do you allso happen to know what might be wrong with my semaphore? Or, how I should do what I described, without a semaphore (although I prefer to use a semaphore, since it's made for such a kind of things...)? Thanks. .