This repository has been archived by the owner on Oct 12, 2022. It is now read-only.
/
pthread.d
50 lines (45 loc) · 1.9 KB
/
pthread.d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/**
* D header file for OSX.
*
* Copyright: Copyright Sean Kelly 2008 - 2009.
* License: <a href="http://www.boost.org/LICENSE_1_0.txt">Boost License 1.0</a>.
* Authors: Sean Kelly
*/
/* Copyright Sean Kelly 2008 - 2009.
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
*/
module core.sys.osx.pthread;
version (OSX):
public import core.sys.posix.pthread;
public import core.sys.osx.mach.port;
extern (C):
int pthread_is_threaded_np();
int pthread_threadid_np(pthread_t, ulong*);
// ^ __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2)
int pthread_rwlock_longrdlock_np(pthread_rwlock_t*);
int pthread_rwlock_yieldwrlock_np(pthread_rwlock_t*);
// ^ __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_NA);
int pthread_rwlock_downgrade_np(pthread_rwlock_t*);
int pthread_rwlock_upgrade_np(pthread_rwlock_t*);
int pthread_rwlock_tryupgrade_np(pthread_rwlock_t*);
int pthread_rwlock_held_np(pthread_rwlock_t*);
int pthread_rwlock_rdheld_np(pthread_rwlock_t*);
int pthread_rwlock_wrheld_np(pthread_rwlock_t*);
int pthread_getname_np(pthread_t, char*, size_t);
int pthread_setname_np(in char*);
// ^ __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2)
int pthread_main_np();
mach_port_t pthread_mach_thread_np(pthread_t);
size_t pthread_get_stacksize_np(pthread_t);
void* pthread_get_stackaddr_np(pthread_t);
int pthread_cond_signal_thread_np(pthread_cond_t*, pthread_t);
int pthread_cond_timedwait_relative_np(pthread_cond_t*, pthread_mutex_t*, in timespec*);
int pthread_create_suspended_np(pthread_t*, in pthread_attr_t*, void* function(void*), void*);
int pthread_kill(pthread_t, int);
pthread_t pthread_from_mach_thread_np(mach_port_t);
// ^ __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0)
int pthread_sigmask(int, in sigset_t*, sigset_t*);
// ^ __DARWIN_ALIAS(pthread_sigmask)
void pthread_yield_np();