On 13/07/2023 19:00, Corinna Vinschen wrote:
On Jul 13 14:14, Jon Turney wrote:
Take note of schedparam in any pthread_attr_t passed to pthread_create.
postcreate() (racily, after the thread is actually created), sets the
scheduling priority if it's inherited, but precreate() doesn't store any
scheduling priority explicitly set via a non-default attr to create, so
schedparam.sched_priority has the default value of 0.
(I think this is another long-standing bug exposed by 4b51e4c1. Now we
don't lie about the actual thread priority, it's apparent it's not
really being set in this case.)
Fixes testcase priority2.
Fixes: tag?
I cannot give you a specific commit which introduces this bug.
It might have been there all a long, or introduced somewhere a long the
way, but masked until 4b51e4c1, but on second thoughts I'm not so sure
about my reasoning about that.
Signed-off-by: tag?
Sure, I'll add it.