summaryrefslogtreecommitdiff
path: root/sysdeps/mach/pt-thread-alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/mach/pt-thread-alloc.c')
-rw-r--r--sysdeps/mach/pt-thread-alloc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sysdeps/mach/pt-thread-alloc.c b/sysdeps/mach/pt-thread-alloc.c
index 1acba98..3d7c046 100644
--- a/sysdeps/mach/pt-thread-alloc.c
+++ b/sysdeps/mach/pt-thread-alloc.c
@@ -1,5 +1,5 @@
/* Start thread. Mach version.
- Copyright (C) 2000, 2002, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2002, 2005, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -63,6 +63,9 @@ create_wakeupmsg (struct __pthread *thread)
int
__pthread_thread_alloc (struct __pthread *thread)
{
+ if (thread->have_kernel_resources)
+ return 0;
+
error_t err;
err = create_wakeupmsg (thread);
@@ -97,5 +100,7 @@ __pthread_thread_alloc (struct __pthread *thread)
return EAGAIN;
}
+ thread->have_kernel_resources = 1;
+
return 0;
}