Sign in Join

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

Mailing lists / fpc-pascal / 2009-10

Thread Priorities - Linux

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Unknown author

Hi Guys,

The Linux tthread.inc file in FPC 2.2.4 refers:

There is a constant array defined at line 55 that lists 'priority' values which I think are inverted. i.e. Currently, the listed values range from -20 to +19 and these map to tpIdle to tpRealtime. According to man nice(1), Nicenesses range from -20 (most favorable scheduling) to 19 (least favorable scheduling).

The comment on line 54 should perhaps be reworded to reflect that although it's not implemented in the current release, the user is free to use the values if he so wishes. It's not stupid, one never knows what the next guy will do with ones code.

If the above has been sorted for the next release, that's cool.

Regards,
Nino

Reply by email

Graeme Geldenhuys
to Unknown author

2009/10/20 :

Show quoted text 5 lines
The comment on line 54 should perhaps be reworded to reflect that although it's not implemented in the current release, the user is free to use the values if he so wishes. It's not stupid, one never knows what the next guy will do with ones code.

It is mentioned in the documentation that under Linux the thread priority is a lot more fine grained than Windows and the constants defined are just suggestions for Linux developers.

I can't remember exactly we in the docs that was, but I know I read it somewhere.

Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/

Reply by email

Unknown author
to Graeme Geldenhuys
Show quoted text 9 lines
2009/10/20 : > The comment on line 54 should perhaps be reworded to reflect that > although it's not implemented in the current release, the user is free to > use the values if he so wishes. It's not stupid, one never knows what the > next guy will do with ones code. It is mentioned in the documentation that under Linux the thread priority is a lot more fine grained than Windows and the constants defined are just suggestions for Linux developers.

My question/suggestion has little to do with the actual priority values. If you implement something, for present or future use, it must be correct or leave it out.

Please look at the code in question.

I can't remember exactly we in the docs that was, but I know I read it somewhere.

Reply by email