Loading...
--- Libc/Libc-498/pthreads/pthread.h
+++ Libc/Libc-825.26/pthreads/pthread.h
@@ -144,6 +144,7 @@
*/
#include <sys/cdefs.h>
+#include <Availability.h>
__BEGIN_DECLS
/*
@@ -221,6 +222,11 @@
*/
#define PTHREAD_MUTEX_INITIALIZER {_PTHREAD_MUTEX_SIG_init, {0}}
+
+#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || defined(_DARWIN_C_SOURCE)
+#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER {_PTHREAD_ERRORCHECK_MUTEX_SIG_init, {0}}
+#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER {_PTHREAD_RECURSIVE_MUTEX_SIG_init, {0}}
+#endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || _DARWIN_C_SOURCE */
/*
* Condition variable attributes
@@ -472,6 +478,20 @@
/* returns non-zero if pthread_create or cthread_fork have been called */
int pthread_is_threaded_np(void);
+int pthread_threadid_np(pthread_t,__uint64_t*) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2);
+
+int pthread_rwlock_longrdlock_np(pthread_rwlock_t *) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_NA);
+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 *);
+
+/*SPI to set and get pthread name*/
+int pthread_getname_np(pthread_t,char*,size_t) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2);
+int pthread_setname_np(const char*) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2);
/* returns non-zero if the current thread is the main thread */
int pthread_main_np(void);
@@ -495,7 +515,7 @@
void *);
int pthread_kill(pthread_t, int);
-pthread_t pthread_from_mach_thread_np(mach_port_t);
+pthread_t pthread_from_mach_thread_np(mach_port_t) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
//Begin-Libc
#ifndef LIBC_ALIAS_PTHREAD_SIGMASK