aboutsummaryrefslogtreecommitdiff
path: root/nptl/pthread_create.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2014-11-21 14:16:47 -0800
committerRoland McGrath <roland@hack.frob.com>2014-11-21 14:16:47 -0800
commit33cd1f74b8cf7022d2c89f14b2db8c15ea1c3c3a (patch)
treeb9c7e5102d087ed951450899396d13524fa2976b /nptl/pthread_create.c
parent6d3db89b12e5c206b8848f0ab35e0632dbbf4bbf (diff)
downloadglibc-33cd1f74b8cf7022d2c89f14b2db8c15ea1c3c3a.zip
glibc-33cd1f74b8cf7022d2c89f14b2db8c15ea1c3c3a.tar.gz
glibc-33cd1f74b8cf7022d2c89f14b2db8c15ea1c3c3a.tar.bz2
NPTL: Fix pthread_create regression from default-sched.h refactoring.
Diffstat (limited to 'nptl/pthread_create.c')
-rw-r--r--nptl/pthread_create.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c
index 3d4b8cd..0e96a2e 100644
--- a/nptl/pthread_create.c
+++ b/nptl/pthread_create.c
@@ -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))