2009-02-18 05:09:39     uClinux thread priority

Document created by Aaronwu Employee on Aug 13, 2013
Version 1Show Document
  • View in full screen mode

2009-02-18 05:09:39     uClinux thread priority

Aparna Dutta (INDIA)

Message: 69550   

 

 

 

I have 2 questions regarding the pthread priority level in uClinux.

 

1. What are the maximum and minimum thread priorities supported in uClinux?

 

2. What is the priority ordering of threads in uClinux? Is it the same as in POSIX threads, that is, a higher number corresponds to a higher priority and lower number corresponds to lower priority ?

 

Thanks and regards,

 

Aparna

QuoteReplyEditDelete

 

 

2009-02-18 16:18:37     Re: uClinux thread priority

Mike Frysinger (UNITED STATES)

Message: 69582   

 

the C library we use is uClibc and it aims for POSIX conformance.  so if you have pthread questions, you can just read the pthread documentation.

 

www.opengroup.org/onlinepubs/9699919799/basedefs/pthread.h.html

 

if you find a discrepancy, we'll take a look and make sure the spec is respected

QuoteReplyEditDelete

 

 

2009-02-19 10:32:17     Re: uClinux thread priority

ThangarJ P (INDIA)

Message: 69640   

 

Hi,

 

The priority ordering of threads in uCinux is same as POSIX threads.

 

Minimum Thread Priority is one.

 

But i am not sure about maximum priority inb uClinux.

QuoteReplyEditDelete

 

 

2009-02-20 05:29:10     Re: uClinux thread priority

Aparna Dutta (INDIA)

Message: 69687   

 

 

 

Thanks for the information

 

I guess the range of priority values supported is implementation-dependent and can be obtained using the sched_get_priority_max() and sched_get_priority_min() functions.

 

Regarding the priority ordering, I believe POSIX specifies higher priority for higher integer values and lower priorities for lower integer values. But in the following link,  docs.blackfin.uclinux.org/doku.php?id=why_use_uclinux, it is mentioned that "Priority level one is the highest priority, and priority thirty is the lowest".  So which is the correct ?

 

Regards,

 

Aparna

QuoteReplyEditDelete

 

 

2009-02-20 10:25:12     Re: uClinux thread priority

Mike Frysinger (UNITED STATES)

Message: 69699   

 

that is talking about kernel internals, not the POSIX threading interface

Attachments

    Outcomes