[fpc-pascal] Re: GetAffinity\SetAffinity
Jeppe Græsdal Johansen
jeppe at j-software.dk
Fri Nov 22 19:16:25 CET 2013
Den 22-11-2013 16:21, Brian skrev:
> Mark ... sorry for the mixup. The program and unit should now be stand alone.
> The unit links libc (rev6).
Your code is broken.
You are using the console output from two threads simultaneously without
proper locking. That's most likely what's causing the crash.
The critical sections you are using only protect each thread against
itself, meaning they basically do nothing. Being inside a critical
section is not a guarantee that you won't get preempted, but just that
no other threads can enter the same section.
More information about the fpc-pascal