![]() |
Telelogic Rhapsody (steve huntington) | ![]() |
Topic Title: Defining thread priority Topic Summary: Created On: 16-Nov-2005 09:09 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
How do you specify thread priorities, that are usable/valid in multiple environments?
In some environments, a low value is considered high priority and vice versa, which is not nessecerily true in other environments! In some environments the priority values range from 0-255 and 0-31 in other! ------------------------- Jesper Gissel Johnson Controls Denmark, Marine Controls |
|
![]() |
|
![]() |
|
Hi Jesper
Most adapters define standard symbols for low, medium and high priority. For instance, VxOS.h contains the following lines: [CODE]#define PRIORITY_HIGH 1 #define PRIORITY_NORMAL 100 #define PRIORITY_LOW 255 /* lowest priority is 255 */[/CODE] Unfortunately, there seem to be several "non-conformant" adapters, such as QNX: [CODE]const int LowestPriority = 0; const int HeighestPriority = 63; const int PRIO_NORMAL = 30;[/CODE] Nevertheless, I've used the "standard" symbols to define by own "platform-independent" priority levels using something like: [CODE]#define PRIORITY_LOWISH ((4*PRIORITY_LOW + PRIORITY_HIGH)/5)[/CODE] I appreciate this is far from ideal.... ![]() ![]() regards, Simon ------------------------- Simon Morrish simon.morrish@eu.panasonic.com http://panasonic.co.uk Panasonic ideas for life |
|
![]() |
Telelogic Rhapsody
» Rhapsody Category » Rhapsody
»
Defining thread priority
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.