This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: pthread_atfork()


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]