| | |
Using a Semaphore in Reentrant function
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
•
•
Join Date: May 2004
Posts: 178
Reputation:
Solved Threads: 10
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?
'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?
•
•
Join Date: May 2007
Posts: 9
Reputation:
Solved Threads: 0
I got the answer from below link.
http://www.unet.univie.ac.at/aix/aix...m#o8Nfj357manu
http://www.unet.univie.ac.at/aix/aix...m#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?
![]() |
Similar Threads
- PHP Feezing with a function (PHP)
- ASP Replace Function.... (ASP)
- missing function header (C++)
- Function that returns void (C++)
Other Threads in the C Forum
- Previous Thread: error 356?
- Next Thread: creating archives
| Thread Tools | Search this Thread |
Tag cloud for C
#include * append array arrays asterisks binarysearch calculate changingto char character cm command copyimagefile cprogramme creafecopyofanytypeoffileinc database directory dynamic execv feet fgets file fork forloop framework function functions givemetehcodez grade graphics gtkwinlinux hacking histogram homework inches include incrementoperators input intmain() iso kernel keyboard km lazy license linked linkedlist linux list lists locate logical_drives looping loopinsideloop. lowest matrix microsoft mqqueue number oddnumber odf opendocumentformat opensource overwrite owf pdf performance pointer posix problem probleminc process program programming radix recursion recv recvblocked research reversing scanf scripting segmentationfault sequential socket spoonfeeding standard string student systemcall testing threads turboc unix user variable wab whythiscodecausesegmentationfault windowsapi





