Michael Schnell schrieb:
All code executed in between such two calls is absolutely ignorant of
the state of the CS, there is no in/outside.
The "State" (relevant to this thread) of CS does not change when some
code of the thread is between enter and leave. So it is not "ignorant"
but it does know that it "owns" the CS and is the only thread that is
inside.
The code in a called subroutine doesn't know about the CS. [It usually
also doesn't care about from which exact thread it was called]
This means that possible recursion must be prevented in all related code
in a CS, or (safer) that the CS must be "recursive" (spinlock?) on all
platforms.
DoDi
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel