Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2006-09

Please Help - Need ONE HINT - Trying to get something like sched_yield with free pascal in linux

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Jason Sage

Hi all - and thanks to who ever can respond in advance.

I have a Server Like App - I need the equivalent of sched_yield

I looked in oldlinux unit, and tried the syscallregs , I tried to use the time structure with it and the syscall_nr_sched_yield (=158) parameter.

The problem is - in my main process's loop - it never givers up the CPU - now the really sad thing is in win32 I'm getting much better response using the sleep system call - just a few milliseconds is all I need, just to allow other things the OS and other spawned threads might want to get done also.

I was thinking there might be something to signals - but I don't understand them yet.

Any suggestions would be greatly appreciated.

Jason P Sage

Reply by email