1 |
/* Start thread. Mach version. |
/* Start thread. Mach version. |
2 |
Copyright (C) 2000,02 Free Software Foundation, Inc. |
Copyright (C) 2000, 2002, 2005 Free Software Foundation, Inc. |
3 |
This file is part of the GNU C Library. |
This file is part of the GNU C Library. |
4 |
|
|
5 |
The GNU C Library is free software; you can redistribute it and/or |
The GNU C Library is free software; you can redistribute it and/or |
50 |
MACH_MSG_TYPE_MAKE_SEND); |
MACH_MSG_TYPE_MAKE_SEND); |
51 |
if (err) |
if (err) |
52 |
{ |
{ |
53 |
__mach_port_deallocate (__mach_task_self (), |
__mach_port_destroy (__mach_task_self (), |
54 |
thread->wakeupmsg.msgh_remote_port); |
thread->wakeupmsg.msgh_remote_port); |
55 |
return EAGAIN; |
return EAGAIN; |
56 |
} |
} |
57 |
|
|
86 |
{ |
{ |
87 |
assert (__pthread_total == 0); |
assert (__pthread_total == 0); |
88 |
thread->kernel_thread = __mach_thread_self (); |
thread->kernel_thread = __mach_thread_self (); |
89 |
/* We implicitly hold a reference. */ |
/* We implicitly hold a reference drop the one that we just |
90 |
|
acquired. */ |
91 |
__mach_port_deallocate (__mach_task_self (), thread->kernel_thread); |
__mach_port_deallocate (__mach_task_self (), thread->kernel_thread); |
92 |
} |
} |
93 |
else |
else |