2
Contributors
2
Replies
3
Views
10 Years
Discussion Span
Last Post by venuaccha
0

Do you mean 'will the compiler complain' - no.
'Is it a good idea' - Again, probably not.

Reentrant functions should have all of their data passed to them as arguments, and not use global data structures. Semaphores are traffic cops for access to global objects or shared objects.

This sounds like a threads design problem. What are you trying to do?

0

I got the answer from below link.
http://www.unet.univie.ac.at/aix/aixprggd/genprogc/writing_reentrant_thread_safe_code.htm#o8Nfj357manu


Do you mean 'will the compiler complain' - no.
'Is it a good idea' - Again, probably not.

Reentrant functions should have all of their data passed to them as arguments, and not use global data structures. Semaphores are traffic cops for access to global objects or shared objects.

This sounds like a threads design problem. What are you trying to do?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.