This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: pthread_atfork()
- From: Joel Sherrill <joel dot sherrill at oarcorp dot com>
- To: Raphael Derosso Pereira <raphaelpereira at gmail dot com>
- Cc: "newlib at sources dot redhat dot com" <newlib at sources dot redhat dot com>
- Date: Tue, 13 Jan 2009 10:05:41 -0600
- Subject: Re: pthread_atfork()
- References: <f20381800901130801j794446fbi15271852a97b46bf@mail.gmail.com>
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