1/**
2 * D header file for Darwin.
3 *
4 * Copyright: Copyright Sean Kelly 2008 - 2009.
5 * License:   $(HTTP www.boost.org/LICENSE_1_0.txt, Boost License 1.0).
6 * Authors:   Sean Kelly
7 */
8
9/*          Copyright Sean Kelly 2008 - 2009.
10 * Distributed under the Boost Software License, Version 1.0.
11 *    (See accompanying file LICENSE or copy at
12 *          http://www.boost.org/LICENSE_1_0.txt)
13 */
14module core.sys.darwin.pthread;
15
16version (OSX)
17    version = Darwin;
18else version (iOS)
19    version = Darwin;
20else version (TVOS)
21    version = Darwin;
22else version (WatchOS)
23    version = Darwin;
24
25version (Darwin):
26extern (C):
27nothrow:
28@nogc:
29
30public import core.sys.posix.pthread;
31public import core.sys.darwin.mach.port;
32
33int pthread_is_threaded_np();
34int pthread_threadid_np(pthread_t, ulong*);
35// ^ __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2)
36int pthread_rwlock_longrdlock_np(pthread_rwlock_t*);
37int pthread_rwlock_yieldwrlock_np(pthread_rwlock_t*);
38// ^ __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_NA);
39int pthread_rwlock_downgrade_np(pthread_rwlock_t*);
40int pthread_rwlock_upgrade_np(pthread_rwlock_t*);
41int pthread_rwlock_tryupgrade_np(pthread_rwlock_t*);
42int pthread_rwlock_held_np(pthread_rwlock_t*);
43int pthread_rwlock_rdheld_np(pthread_rwlock_t*);
44int pthread_rwlock_wrheld_np(pthread_rwlock_t*);
45int pthread_getname_np(pthread_t, char*, size_t);
46int pthread_setname_np(const scope char*);
47// ^ __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2)
48int pthread_main_np();
49mach_port_t pthread_mach_thread_np(pthread_t);
50size_t pthread_get_stacksize_np(pthread_t);
51void* pthread_get_stackaddr_np(pthread_t);
52int pthread_cond_signal_thread_np(pthread_cond_t*, pthread_t);
53int pthread_cond_timedwait_relative_np(pthread_cond_t*, pthread_mutex_t*, const scope timespec*);
54int pthread_create_suspended_np(pthread_t*, const scope pthread_attr_t*, void* function(void*), void*);
55int pthread_kill(pthread_t, int);
56pthread_t pthread_from_mach_thread_np(mach_port_t);
57// ^ __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0)
58int pthread_sigmask(int, const scope sigset_t*, sigset_t*);
59// ^ __DARWIN_ALIAS(pthread_sigmask)
60void pthread_yield_np();
61