[fpc-devel] volatile variables
Hans-Peter Diettrich
DrDiettrich1 at aol.com
Wed Jun 29 17:28:46 CEST 2011
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
More information about the fpc-devel
mailing list