[PATCH] pthread_getattr_np, pthread_setschedprio
Mon Apr 11 02:30:00 GMT 2011
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.
This is my first contribution to the threading code, so I'd appreciate a
thorough double-check of my understanding of the specs and code.
Patch for winsup/cygwin attached. As for winsup/doc/new-features.sgml,
should this be merged with the pthread spinlocks line item or kept
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 5111 bytes
Desc: not available
More information about the Cygwin-patches