pthread_atfork()
Joel Sherrill
joel.sherrill@oarcorp.com
Tue Jan 13 16:06:00 GMT 2009
Raphael Derosso Pereira wrote:
> Hello,
>
> I'm wandering if the code
>
> #if !defined(__rtems__)
> #warning "Add pthread_atfork() prototype"
> #endif
>
> is really necessary! It means that anyone not using rtems must see
> this warning for every file that includes pthread.h!
>
> Isn't there another way to do it right?
>
The newlib pthread.h came from RTEMS and we have
multiple threads but not multiple processes. So
I would suggest changing the warning to a prototype.
This is what opengroup.org has:
|int pthread_atfork(void (*/prepare/)(void), void (*/parent/)(void),
void (*/child/)(void));|
Out of curiosity what other target has pthread support
and uses newlib's pthread.h. I thought cygwin had its own
version.
> Best regards,
>
>
--
Joel Sherrill, Ph.D. Director of Research & Development
joel.sherrill@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the Newlib
mailing list