]> git.saurik.com Git - apple/libpthread.git/blob - src/internal.h
libpthread-137.1.1.tar.gz
[apple/libpthread.git] / src / internal.h
1 /*
2 * Copyright (c) 2000-2013 Apple Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23 /*
24 * Copyright 1996 1995 by Open Software Foundation, Inc. 1997 1996 1995 1994 1993 1992 1991
25 * All Rights Reserved
26 *
27 * Permission to use, copy, modify, and distribute this software and
28 * its documentation for any purpose and without fee is hereby granted,
29 * provided that the above copyright notice appears in all copies and
30 * that both the copyright notice and this permission notice appear in
31 * supporting documentation.
32 *
33 * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
34 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
35 * FOR A PARTICULAR PURPOSE.
36 *
37 * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
38 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
39 * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
40 * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
41 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
42 *
43 */
44 /*
45 * MkLinux
46 */
47
48 /*
49 * POSIX Threads - IEEE 1003.1c
50 */
51
52 #ifndef _POSIX_PTHREAD_INTERNALS_H
53 #define _POSIX_PTHREAD_INTERNALS_H
54
55 #define _PTHREAD_BUILDING_PTHREAD_
56
57 // suppress pthread_attr_t typedef in sys/signal.h
58 #define _PTHREAD_ATTR_T
59 struct _pthread_attr_t; /* forward reference */
60 typedef struct _pthread_attr_t pthread_attr_t;
61
62 #include <_simple.h>
63 #include <assert.h>
64 #include <stddef.h>
65 #include <stdint.h>
66 #include <stdlib.h>
67 #include <limits.h>
68 #include <errno.h>
69 #include <TargetConditionals.h>
70 #include <libkern/OSAtomic.h>
71 #include <mach/mach.h>
72 #include <mach/mach_error.h>
73 #include <os/once_private.h>
74 #include <sys/queue.h>
75
76 #ifndef __POSIX_LIB__
77 #define __POSIX_LIB__
78 #endif
79
80 #ifndef PTHREAD_LAYOUT_SPI
81 #define PTHREAD_LAYOUT_SPI 1
82 #endif
83
84 #include "posix_sched.h"
85 #include "tsd_private.h"
86 #include "spinlock_private.h"
87
88 #if TARGET_IPHONE_SIMULATOR
89 #error Unsupported target
90 #endif
91
92 // List of all pthreads in the process.
93 TAILQ_HEAD(__pthread_list, _pthread);
94 extern struct __pthread_list __pthread_head;
95
96 // Lock protects access to above list.
97 extern pthread_lock_t _pthread_list_lock;
98
99 extern int __is_threaded;
100
101 /*
102 * Compiled-in limits
103 */
104 #if TARGET_OS_EMBEDDED
105 #define _EXTERNAL_POSIX_THREAD_KEYS_MAX 256
106 #define _INTERNAL_POSIX_THREAD_KEYS_MAX 256
107 #define _INTERNAL_POSIX_THREAD_KEYS_END 512
108 #else
109 #define _EXTERNAL_POSIX_THREAD_KEYS_MAX 512
110 #define _INTERNAL_POSIX_THREAD_KEYS_MAX 256
111 #define _INTERNAL_POSIX_THREAD_KEYS_END 768
112 #endif
113
114 #define MAXTHREADNAMESIZE 64
115 #define _PTHREAD_T
116 typedef struct _pthread {
117 //
118 // ABI - These fields are externally known as struct _opaque_pthread_t.
119 //
120 long sig; // _PTHREAD_SIG
121 struct __darwin_pthread_handler_rec *__cleanup_stack;
122
123 //
124 // SPI - These fields are private.
125 //
126 // these fields are globally protected by _pthread_list_lock:
127 uint32_t childrun:1,
128 parentcheck:1,
129 childexit:1,
130 pad3:29;
131
132 pthread_lock_t lock; // protect access to everything below
133 uint32_t detached:8,
134 inherit:8,
135 policy:8,
136 kernalloc:1,
137 schedset:1,
138 wqthread:1,
139 wqkillset:1,
140 pad:4;
141
142 #if __LP64__
143 uint32_t pad0;
144 #endif
145 uint64_t thread_id; // 64-bit unique thread id
146
147 void *(*fun)(void*); // thread start routine
148 void *arg; // thread start routine argument
149 void *exit_value; // thread exit value storage
150
151 semaphore_t joiner_notify; // pthread_join notification
152
153 int max_tsd_key;
154 int cancel_state; // whether the thread can be cancelled
155 int cancel_error;
156
157 #ifdef __i386__
158 // i386 err_no must be at a 68 byte offset
159 // See <rdar://problem/13249323>
160 uint32_t __13249323_pad[3];
161 #endif
162 int err_no; // thread-local errno
163
164 struct _pthread *joiner;
165
166 struct sched_param param; // [aligned]
167
168 TAILQ_ENTRY(_pthread) plist; // global thread list [aligned]
169
170 char pthread_name[MAXTHREADNAMESIZE]; // includes NUL [aligned]
171
172 void *stackaddr; // base of the stack (page aligned)
173 size_t stacksize; // size of stack (page multiple and >= PTHREAD_STACK_MIN)
174
175 void* freeaddr; // stack/thread allocation base address
176 size_t freesize; // stack/thread allocation size
177 size_t guardsize; // guard page size in bytes
178
179 // thread specific data
180 void *tsd[_EXTERNAL_POSIX_THREAD_KEYS_MAX + _INTERNAL_POSIX_THREAD_KEYS_MAX] __attribute__ ((aligned (16)));
181 } *pthread_t;
182
183
184 struct _pthread_attr_t {
185 long sig;
186 pthread_lock_t lock;
187 uint32_t detached:8,
188 inherit:8,
189 policy:8,
190 fastpath:1,
191 schedset:1,
192 qosset:1,
193 unused:5;
194 struct sched_param param; // [aligned]
195 void *stackaddr; // stack base; vm_page_size aligned
196 size_t stacksize; // stack size; multiple of vm_page_size and >= PTHREAD_STACK_MIN
197 size_t guardsize; // size in bytes of stack overflow guard area
198 unsigned long qosclass;
199 #if defined(__LP64__)
200 uint32_t _reserved[2];
201 #else
202 uint32_t _reserved[1];
203 #endif
204 };
205
206 /*
207 * Mutex attributes
208 */
209 #define _PTHREAD_MUTEX_POLICY_NONE 0
210 #define _PTHREAD_MUTEX_POLICY_FAIRSHARE 1
211 #define _PTHREAD_MUTEX_POLICY_FIRSTFIT 2
212 #define _PTHREAD_MUTEX_POLICY_REALTIME 3
213 #define _PTHREAD_MUTEX_POLICY_ADAPTIVE 4
214 #define _PTHREAD_MUTEX_POLICY_PRIPROTECT 5
215 #define _PTHREAD_MUTEX_POLICY_PRIINHERIT 6
216
217 #define _PTHREAD_MUTEXATTR_T
218 typedef struct {
219 long sig;
220 int prioceiling;
221 uint32_t protocol:2,
222 type:2,
223 pshared:2,
224 policy:3,
225 unused:23;
226 } pthread_mutexattr_t;
227
228 struct _pthread_mutex_options {
229 uint32_t protocol:2,
230 type:2,
231 pshared:2,
232 policy:3,
233 hold:2,
234 misalign:1,
235 notify:1,
236 mutex:1,
237 unused:2,
238 lock_count:16;
239 };
240
241 typedef struct {
242 long sig;
243 pthread_lock_t lock;
244 union {
245 uint32_t value;
246 struct _pthread_mutex_options options;
247 } mtxopts;
248 int16_t prioceiling;
249 int16_t priority;
250 #if defined(__LP64__)
251 uint32_t _pad;
252 #endif
253 uint32_t m_tid[2]; // thread id of thread that has mutex locked, misaligned locks may span to first field of m_seq
254 uint32_t m_seq[3];
255 #if defined(__LP64__)
256 uint32_t _reserved;
257 #endif
258 void *reserved2[2];
259 } _pthread_mutex;
260
261
262 #define _PTHREAD_CONDATTR_T
263 typedef struct {
264 long sig;
265 uint32_t pshared:2,
266 unsupported:30;
267 } pthread_condattr_t;
268
269
270 typedef struct {
271 long sig;
272 pthread_lock_t lock;
273 uint32_t unused:29,
274 misalign:1,
275 pshared:2;
276 _pthread_mutex *busy;
277 uint32_t c_seq[3];
278 #if defined(__LP64__)
279 uint32_t _reserved[3];
280 #endif
281 } _pthread_cond;
282
283
284 #define _PTHREAD_ONCE_T
285 typedef struct {
286 long sig;
287 os_once_t once;
288 } pthread_once_t;
289
290
291 #define _PTHREAD_RWLOCKATTR_T
292 typedef struct {
293 long sig;
294 int pshared;
295 #if defined(__LP64__)
296 uint32_t _reserved[3];
297 #else
298 uint32_t _reserved[2];
299 #endif
300 } pthread_rwlockattr_t;
301
302
303 typedef struct {
304 long sig;
305 pthread_lock_t lock;
306 uint32_t unused:29,
307 misalign:1,
308 pshared:2;
309 uint32_t rw_flags;
310 #if defined(__LP64__)
311 uint32_t _pad;
312 #endif
313 volatile uint32_t rw_seq[4];
314 struct _pthread *rw_owner;
315 volatile uint32_t *rw_lcntaddr;
316 volatile uint32_t *rw_seqaddr;
317 volatile uint32_t *rw_ucntaddr;
318 #if defined(__LP64__)
319 uint32_t _reserved[31];
320 #else
321 uint32_t _reserved[19];
322 #endif
323 } _pthread_rwlock;
324
325 #include "pthread_spis.h"
326
327 // Internal references to pthread_self() use TSD slot 0 directly.
328 inline static pthread_t __attribute__((__pure__))
329 _pthread_self_direct(void)
330 {
331 return _pthread_getspecific_direct(_PTHREAD_TSD_SLOT_PTHREAD_SELF);
332 }
333 #define pthread_self() _pthread_self_direct()
334
335 inline static pthread_t __attribute__((__pure__))
336 _pthread_selfid_direct(void)
337 {
338 return (_pthread_self_direct())->thread_id;
339 }
340
341 #define _PTHREAD_DEFAULT_INHERITSCHED PTHREAD_INHERIT_SCHED
342 #define _PTHREAD_DEFAULT_PROTOCOL PTHREAD_PRIO_NONE
343 #define _PTHREAD_DEFAULT_PRIOCEILING 0
344 #define _PTHREAD_DEFAULT_POLICY SCHED_OTHER
345 #define _PTHREAD_DEFAULT_STACKSIZE 0x80000 /* 512K */
346 #define _PTHREAD_DEFAULT_PSHARED PTHREAD_PROCESS_PRIVATE
347
348 #define _PTHREAD_NO_SIG 0x00000000
349 #define _PTHREAD_MUTEX_ATTR_SIG 0x4D545841 /* 'MTXA' */
350 #define _PTHREAD_MUTEX_SIG 0x4D555458 /* 'MUTX' */
351 #define _PTHREAD_MUTEX_SIG_fast 0x4D55545A /* 'MUTZ' */
352 #define _PTHREAD_MUTEX_SIG_MASK 0xfffffffd
353 #define _PTHREAD_MUTEX_SIG_CMP 0x4D555458 /* _PTHREAD_MUTEX_SIG & _PTHREAD_MUTEX_SIG_MASK */
354 #define _PTHREAD_MUTEX_SIG_init 0x32AAABA7 /* [almost] ~'MUTX' */
355 #define _PTHREAD_ERRORCHECK_MUTEX_SIG_init 0x32AAABA1
356 #define _PTHREAD_RECURSIVE_MUTEX_SIG_init 0x32AAABA2
357 #define _PTHREAD_FIRSTFIT_MUTEX_SIG_init 0x32AAABA3
358 #define _PTHREAD_MUTEX_SIG_init_MASK 0xfffffff0
359 #define _PTHREAD_MUTEX_SIG_init_CMP 0x32AAABA0
360 #define _PTHREAD_COND_ATTR_SIG 0x434E4441 /* 'CNDA' */
361 #define _PTHREAD_COND_SIG 0x434F4E44 /* 'COND' */
362 #define _PTHREAD_COND_SIG_init 0x3CB0B1BB /* [almost] ~'COND' */
363 #define _PTHREAD_ATTR_SIG 0x54484441 /* 'THDA' */
364 #define _PTHREAD_ONCE_SIG 0x4F4E4345 /* 'ONCE' */
365 #define _PTHREAD_ONCE_SIG_init 0x30B1BCBA /* [almost] ~'ONCE' */
366 #define _PTHREAD_SIG 0x54485244 /* 'THRD' */
367 #define _PTHREAD_RWLOCK_ATTR_SIG 0x52574C41 /* 'RWLA' */
368 #define _PTHREAD_RWLOCK_SIG 0x52574C4B /* 'RWLK' */
369 #define _PTHREAD_RWLOCK_SIG_init 0x2DA8B3B4 /* [almost] ~'RWLK' */
370
371
372 #define _PTHREAD_KERN_COND_SIG 0x12345678 /* */
373 #define _PTHREAD_KERN_MUTEX_SIG 0x34567812 /* */
374 #define _PTHREAD_KERN_RWLOCK_SIG 0x56781234 /* */
375
376 #define _PTHREAD_CREATE_PARENT 4
377 #define _PTHREAD_EXITED 8
378 // 4597450: begin
379 #define _PTHREAD_WASCANCEL 0x10
380 // 4597450: end
381
382 #if defined(DEBUG)
383 #define _PTHREAD_MUTEX_OWNER_SELF pthread_self()
384 #else
385 #define _PTHREAD_MUTEX_OWNER_SELF (pthread_t)0x12141968
386 #endif
387 #define _PTHREAD_MUTEX_OWNER_SWITCHING (pthread_t)(~0)
388
389 #define _PTHREAD_CANCEL_STATE_MASK 0x01
390 #define _PTHREAD_CANCEL_TYPE_MASK 0x02
391 #define _PTHREAD_CANCEL_PENDING 0x10 /* pthread_cancel() has been called for this thread */
392
393 extern boolean_t swtch_pri(int);
394
395 #define PTHREAD_EXPORT extern __attribute__((visibility("default")))
396 #define PTHREAD_EXTERN extern
397 #define PTHREAD_NOEXPORT __attribute__((visibility("hidden")))
398 #define PTHREAD_NORETURN __attribute__((__noreturn__))
399 #define PTHREAD_ALWAYS_INLINE __attribute__((always_inline))
400 #define PTHREAD_NOINLINE __attribute__((noinline))
401 #define PTHREAD_WEAK __attribute__((weak))
402 #define PTHREAD_USED __attribute__((used))
403
404 #include "kern/kern_internal.h"
405
406 /* Prototypes. */
407
408 /* Internal globals. */
409 PTHREAD_NOEXPORT extern int __pthread_supported_features;
410
411 /* Functions defined in machine-dependent files. */
412 PTHREAD_NOEXPORT void _pthread_setup(pthread_t th, void (*f)(pthread_t), void *sp, int suspended, int needresume);
413
414 PTHREAD_NOEXPORT void _pthread_tsd_cleanup(pthread_t self);
415
416 PTHREAD_NOEXPORT int __mtx_droplock(_pthread_mutex *mutex, uint32_t * flagp, uint32_t ** pmtxp, uint32_t * mgenp, uint32_t * ugenp);
417
418 /* internally redirected upcalls. */
419 PTHREAD_NOEXPORT void* malloc(size_t);
420 PTHREAD_NOEXPORT void free(void*);
421
422 /* syscall interfaces */
423 extern uint32_t __psynch_mutexwait(pthread_mutex_t * mutex, uint32_t mgen, uint32_t ugen, uint64_t tid, uint32_t flags);
424 extern uint32_t __psynch_mutexdrop(pthread_mutex_t * mutex, uint32_t mgen, uint32_t ugen, uint64_t tid, uint32_t flags);
425
426 extern uint32_t __psynch_cvbroad(pthread_cond_t * cv, uint64_t cvlsgen, uint64_t cvudgen, uint32_t flags, pthread_mutex_t * mutex, uint64_t mugen, uint64_t tid);
427 extern uint32_t __psynch_cvsignal(pthread_cond_t * cv, uint64_t cvlsgen, uint32_t cvugen, int thread_port, pthread_mutex_t * mutex, uint64_t mugen, uint64_t tid, uint32_t flags);
428 extern uint32_t __psynch_cvwait(pthread_cond_t * cv, uint64_t cvlsgen, uint32_t cvugen, pthread_mutex_t * mutex, uint64_t mugen, uint32_t flags, int64_t sec, uint32_t nsec);
429 extern uint32_t __psynch_cvclrprepost(void * cv, uint32_t cvgen, uint32_t cvugen, uint32_t cvsgen, uint32_t prepocnt, uint32_t preposeq, uint32_t flags);
430 extern uint32_t __psynch_rw_longrdlock(pthread_rwlock_t * rwlock, uint32_t lgenval, uint32_t ugenval, uint32_t rw_wc, int flags);
431 extern uint32_t __psynch_rw_yieldwrlock(pthread_rwlock_t * rwlock, uint32_t lgenval, uint32_t ugenval, uint32_t rw_wc, int flags);
432 extern int __psynch_rw_downgrade(pthread_rwlock_t * rwlock, uint32_t lgenval, uint32_t ugenval, uint32_t rw_wc, int flags);
433 extern uint32_t __psynch_rw_upgrade(pthread_rwlock_t * rwlock, uint32_t lgenval, uint32_t ugenval, uint32_t rw_wc, int flags);
434 extern uint32_t __psynch_rw_rdlock(pthread_rwlock_t * rwlock, uint32_t lgenval, uint32_t ugenval, uint32_t rw_wc, int flags);
435 extern uint32_t __psynch_rw_wrlock(pthread_rwlock_t * rwlock, uint32_t lgenval, uint32_t ugenval, uint32_t rw_wc, int flags);
436 extern uint32_t __psynch_rw_unlock(pthread_rwlock_t * rwlock, uint32_t lgenval, uint32_t ugenval, uint32_t rw_wc, int flags);
437 extern uint32_t __psynch_rw_unlock2(pthread_rwlock_t * rwlock, uint32_t lgenval, uint32_t ugenval, uint32_t rw_wc, int flags);
438 extern uint32_t __bsdthread_ctl(uintptr_t cmd, uintptr_t arg1, uintptr_t arg2, uintptr_t arg3);
439
440 PTHREAD_EXTERN
441 int
442 __proc_info(int callnum, int pid, int flavor, uint64_t arg, void * buffer, int buffersize);
443
444 PTHREAD_NOEXPORT int _pthread_lookup_thread(pthread_t thread, mach_port_t * port, int only_joinable);
445 PTHREAD_NOEXPORT int _pthread_join_cleanup(pthread_t thread, void ** value_ptr, int conforming);
446
447 PTHREAD_NORETURN PTHREAD_NOEXPORT
448 void
449 __pthread_abort(void);
450
451 PTHREAD_NORETURN PTHREAD_NOEXPORT
452 void
453 __pthread_abort_reason(const char *fmt, ...);
454
455 PTHREAD_NOEXPORT
456 void
457 _pthread_set_main_qos(pthread_priority_t qos);
458
459 PTHREAD_NOEXPORT
460 void
461 _pthread_key_global_init(const char *envp[]);
462
463 PTHREAD_EXPORT
464 void
465 _pthread_start(pthread_t self, mach_port_t kport, void *(*fun)(void *), void * funarg, size_t stacksize, unsigned int flags);
466
467 PTHREAD_EXPORT
468 void
469 _pthread_wqthread(pthread_t self, mach_port_t kport, void *stackaddr, void *keventlist, int flags, int nkevents);
470
471 PTHREAD_NOEXPORT
472 void
473 __pthread_fork_child_internal(pthread_t p);
474
475 PTHREAD_EXPORT
476 void
477 _pthread_clear_qos_tsd(mach_port_t thread_port);
478
479 PTHREAD_EXPORT
480 void
481 _pthread_testcancel(pthread_t thread, int isconforming);
482
483 PTHREAD_EXPORT
484 void
485 _pthread_exit_if_canceled(int error);
486
487 PTHREAD_ALWAYS_INLINE
488 static inline mach_port_t
489 _pthread_kernel_thread(pthread_t t)
490 {
491 return t->tsd[_PTHREAD_TSD_SLOT_MACH_THREAD_SELF];
492 }
493
494 PTHREAD_ALWAYS_INLINE
495 static inline void
496 _pthread_set_kernel_thread(pthread_t t, mach_port_t p)
497 {
498 t->tsd[_PTHREAD_TSD_SLOT_MACH_THREAD_SELF] = p;
499 }
500
501 #define PTHREAD_ABORT(f,...) __pthread_abort_reason("%s:%s:%u: " f, __FILE__, __func__, __LINE__, ## __VA_ARGS__)
502
503 #define PTHREAD_ASSERT(b) do { if (!(b)) PTHREAD_ABORT("failed assertion `%s'", #b); } while (0)
504
505 #include <os/semaphore_private.h>
506 #include <os/alloc_once_private.h>
507
508 struct pthread_atfork_entry {
509 void (*prepare)(void);
510 void (*parent)(void);
511 void (*child)(void);
512 };
513
514 #define PTHREAD_ATFORK_INLINE_MAX 10
515 #define PTHREAD_ATFORK_MAX (vm_page_size/sizeof(struct pthread_atfork_entry))
516
517 struct pthread_globals_s {
518 // atfork.c
519 pthread_t psaved_self;
520 OSSpinLock psaved_self_global_lock;
521 OSSpinLock pthread_atfork_lock;
522
523 size_t atfork_count;
524 struct pthread_atfork_entry atfork_storage[PTHREAD_ATFORK_INLINE_MAX];
525 struct pthread_atfork_entry *atfork;
526 };
527 typedef struct pthread_globals_s *pthread_globals_t;
528
529 __attribute__((__pure__))
530 static inline pthread_globals_t
531 _pthread_globals(void)
532 {
533 return os_alloc_once(OS_ALLOC_ONCE_KEY_LIBSYSTEM_PTHREAD,
534 sizeof(struct pthread_globals_s),
535 NULL);
536 }
537
538 #pragma mark _pthread_mutex_check_signature
539
540 PTHREAD_ALWAYS_INLINE
541 static inline bool
542 _pthread_mutex_check_signature_fast(_pthread_mutex *mutex)
543 {
544 return os_fastpath(mutex->sig == _PTHREAD_MUTEX_SIG_fast);
545 }
546
547 PTHREAD_ALWAYS_INLINE
548 static inline bool
549 _pthread_mutex_check_signature(_pthread_mutex *mutex)
550 {
551 return os_fastpath((mutex->sig & _PTHREAD_MUTEX_SIG_MASK) == _PTHREAD_MUTEX_SIG_CMP);
552 }
553
554 PTHREAD_ALWAYS_INLINE
555 static inline bool
556 _pthread_mutex_check_signature_init(_pthread_mutex *mutex)
557 {
558 return os_fastpath((mutex->sig & _PTHREAD_MUTEX_SIG_init_MASK) == _PTHREAD_MUTEX_SIG_init_CMP);
559 }
560
561 #endif /* _POSIX_PTHREAD_INTERNALS_H */