[fpc-devel] Linux thread priority mess (and possible implementation)

Jonas Maebe jonas.maebe at elis.ugent.be
Thu Jun 24 16:59:59 CEST 2010


On 24 Jun 2010, at 16:46, Graeme Geldenhuys wrote:

> ----------[ Kylix 3 Help ]-------------------------------
> Policy             Type              Priority
> --------------------------------------------------
> SCHED_RR         Real Time           1-99
> SCHED_FIFO       Real Time           1-99
> SCHED_OTHER      Regular              0
>
> Note: The type of thread policy determines the Priority that can be
> assigned to the thread, as indicated in the third column of the  
> table above.
> ------------------------------------------

The above means that Kylix also ignored setting the thread priority on  
Linux for regular processes/threads (since the only allowed value for  
SCHED_OTHER was "0").

> Even if a API is not portable between *nix, at least we can  
> implement it
> per platform, and hopefully create some abstraction layer on top of  
> that,
> or translate TThreadPriority type to the individual platform
> implementations. FPC has many API's implemented that are not portable
> between platforms - so this should not be a stopping block.

That's why I added "I'm not even sure about what the low level APIs  
are on particular Unix platforms such as Linux and Mac OS X".


Jonas



More information about the fpc-devel mailing list