From 33cd1f74b8cf7022d2c89f14b2db8c15ea1c3c3a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 21 Nov 2014 14:16:47 -0800 Subject: NPTL: Fix pthread_create regression from default-sched.h refactoring. --- nptl/pthread_create.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'nptl') diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c index 3d4b8cd94e..0e96a2ea8f 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)) -- cgit v1.2.3-65-gdbad