Skip to content

Commit

Permalink
NPTL: Fix pthread_create regression from default-sched.h refactoring.
Browse files Browse the repository at this point in the history
  • Loading branch information
Roland McGrath committed Nov 21, 2014
1 parent 6d3db89 commit 33cd1f7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2014-11-21 Roland McGrath <roland@hack.frob.com>

* nptl/pthread_create.c (__pthread_create_2_1): Set
ATTR_FLAG_POLICY_SET and/or ATTR_FLAG_SCHED_SET in PD->flags
when copying values from IATTR into PD.

2014-11-21 Will Newton <will.newton@linaro.org>
Andrew Pinski <andrew.pinski@caviumnetworks.com>

Expand Down
12 changes: 9 additions & 3 deletions nptl/pthread_create.c
Original file line number Diff line number Diff line change
Expand Up @@ -596,10 +596,16 @@ __pthread_create_2_1 (newthread, attr, start_routine, arg)
{
/* Use the scheduling parameters the user provided. */
if (iattr->flags & ATTR_FLAG_POLICY_SET)
pd->schedpolicy = iattr->schedpolicy;
{
pd->schedpolicy = iattr->schedpolicy;
pd->flags |= ATTR_FLAG_POLICY_SET;
}
if (iattr->flags & ATTR_FLAG_SCHED_SET)
/* The values were validated in pthread_attr_setschedparam. */
pd->schedparam = iattr->schedparam;
{
/* The values were validated in pthread_attr_setschedparam. */
pd->schedparam = iattr->schedparam;
pd->flags |= ATTR_FLAG_SCHED_SET;
}

if ((pd->flags & (ATTR_FLAG_SCHED_SET | ATTR_FLAG_POLICY_SET))
!= (ATTR_FLAG_SCHED_SET | ATTR_FLAG_POLICY_SET))
Expand Down

0 comments on commit 33cd1f7

Please sign in to comment.