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

Graeme Geldenhuys graemeg.lists at gmail.com
Thu Jun 24 11:21:09 CEST 2010


Op 2010-06-24 11:06, Graeme Geldenhuys het geskryf:
> * Dynamic priorities have a range of -20..20
>   Just to f*ck with you even more, this range is now switched around.
>     -20 is real-time
>     0 is normal
>     20 is idle


And here is why I say it is wrong... rtl/unix/tthread.inc

  TThreadPriority = (tpIdle, tpLowest, tpLower, tpNormal, tpHigher, tpHighest,
    tpTimeCritical);


const
  // stupid, considering its not even implemented...
  Priorities: array [TThreadPriority] of Integer =
   (-20,-19,-10,0,9,18,19);


Here -20 is tpIdle, but in the quoted text from my previous email, dynamic
priority of -20 is real-time which should then be tpTimeCritical.  The
comment in the code is also not very reassuring!



Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/




More information about the fpc-devel mailing list