[fpc-pascal] Use sleep in thread

Henry Vermaak henry.vermaak at gmail.com
Thu Feb 26 11:33:56 CET 2015

On Thu, Feb 26, 2015 at 11:20:41AM +0100, Michael Schnell wrote:
> On 02/26/2015 11:14 AM, Michael Schnell wrote:
> >I don't know what this does.
> With stepping in ASM I verified that (after some calculation) it
> does just a single syscall (via a "sysenter" Assembler instruction).
> so the overhead is minimal.

Blocking with an even will sleep until someone wakes you up, it's very
efficient.  Using sleep() you will have to wake up, check if someone
needs you, go to sleep again, etc.  This is obviously more inefficient.

More information about the fpc-pascal mailing list