MR>> Those are for making sure something is finished without being
MR>> interrupted by signals or exceptions.
MR>> The functions DosEnterCritSec() and DosExitCritSec() are
MR>> intended for making sure the current thread completes before
MR>> all others in the same process (by setting it at a higher
MR>> priority).
ET> I thought that was by preventing being interrupted, not by
ET> setting it at a
ET> higher priority?
No. DosEnterCritSec does not more than blocking all other threads of the same
process. Other Threads of other processes can and will become CPU after
timslice of the running thread is over.
Most (but not all) OS/2 APIs calls DosExitCritSec() under cover. So you should
not use any API (system, runtime, library) unless you know that this function
would never call a system API.
--- Sqed/32 1.14/development
104
* Origin: Schont die Umwelt: Vermeidet DOSen (2:2476/493)
|