summaryrefslogtreecommitdiff
path: root/nptl/sysdeps/pthread/createthread.c
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/sysdeps/pthread/createthread.c')
-rw-r--r--nptl/sysdeps/pthread/createthread.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/nptl/sysdeps/pthread/createthread.c b/nptl/sysdeps/pthread/createthread.c
index fb8d8ce937..8620519887 100644
--- a/nptl/sysdeps/pthread/createthread.c
+++ b/nptl/sysdeps/pthread/createthread.c
@@ -186,6 +186,9 @@ create_thread (struct pthread *pd, const struct pthread_attr *attr,
if ((_mask & (__nptl_threads_events.event_bits[_idx]
| pd->eventbuf.eventmask.event_bits[_idx])) != 0)
{
+ /* We always must have the thread start stopped. */
+ pd->stopped_start = true;
+
/* Create the thread. We always create the thread stopped
so that it does not get far before we tell the debugger. */
int res = do_clone (pd, attr, clone_flags, start_thread,
@@ -224,10 +227,11 @@ create_thread (struct pthread *pd, const struct pthread_attr *attr,
/* Determine whether the newly created threads has to be started
stopped since we have to set the scheduling parameters or set the
affinity. */
- int stopped = 0;
+ bool stopped = false;
if (attr != NULL && (attr->cpuset != NULL
|| (attr->flags & ATTR_FLAG_NOTINHERITSCHED) != 0))
- stopped = 1;
+ stopped = true;
+ pd->stopped_start = stopped;
/* Actually create the thread. */
int res = do_clone (pd, attr, clone_flags, start_thread,