Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic Rhapsody (steve huntington)
Decrease font size
Increase font size
Topic Title: Defining thread priority
Topic Summary:
Created On: 16-Nov-2005 09:09
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 16-Nov-2005 09:09
User is offline View Users Profile Print this message


Jesper Gissel

Posts: 88
Joined: 20-Jul-2005

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
Report this to a Moderator Report this to a Moderator
 16-Nov-2005 09:32
User is offline View Users Profile Print this message


Simon Morrish

Posts: 127
Joined: 17-May-2005

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.... Alternative suggestions welcomed!

regards,
Simon

-------------------------
Simon Morrish
simon.morrish@eu.panasonic.com
http://panasonic.co.uk
Panasonic ideas for life
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic Rhapsody forum.
There are currently 0 users logged in.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.