How to prevent reentrancy inside same process ?
I use the following code to protect some code for being called by multiple processes at same time :
lock +^TEMP("FOO"):0 //don't wait
quit:'$test
//critical section
//...
lock -^TEMP("FOO")
This works between processes but it does not prevent the same process entering critical section twice.
How to do that, is there any lock option ? I would like it to behave as the lock in C# or Java.
It's OK for me to use something else than LOCK instruction (eg : signals)