[PATCH] pthread_getattr_np, pthread_setschedprio
Fri Apr 15 03:42:00 GMT 2011
On Thu, Apr 14, 2011 at 10:00:32PM -0500, Yaakov (Cygwin/X) wrote:
>On Sun, 2011-04-10 at 21:30 -0500, Yaakov (Cygwin/X) wrote:
>> This patch adds two pthread functions which appear to be "low-hanging
>> pthread_setschedprio(3) is a POSIX function which changes the
>> scheduling priority for the given thread. It is similar to
>> pthread_setschedparam(3) but does not change the scheduling policy and
>> doesn't require the priority to be wrapped in a struct.
>> pthread_getattr_np(3) is a GNU extension which initializes the given
>> pthread_attr_t with the actual attributes of the given thread. While
>> the example code does not have the pthread_attr_t pre-initialized by
>> pthread_attr_init(3), I have seen real world code where it is, so either
>> possibility is handled.
>After further analysis, I should work further on pthread_getattr_np() in
>conjunction with adding pthread_attr_getstack(), both of which I need
>for webkitgtk-1.3.13. But it will be a couple of weeks before I'll have
>the time to get to that.
>So for now, lets just implement pthread_setschedprio(), which looks
>pretty straight-forward and is unrelated to the others. Revised patch
Looks ok. Please check in.
More information about the Cygwin-patches