X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=include%2Fpthread.h;h=43754ddd7b47cd31b84c8c497acf0a6cad362545;hb=7ecab79f581c9bd2369dc00a7649bb5af9089302;hp=749a0e8c01f62eb8d8d7a59a290f7d344f9729b8;hpb=e882756311c7b06e59fcc8e582f03852b7dcfd30;p=musl diff --git a/include/pthread.h b/include/pthread.h index 749a0e8c..43754ddd 100644 --- a/include/pthread.h +++ b/include/pthread.h @@ -5,6 +5,7 @@ extern "C" { #endif #define __NEED_time_t +#define __NEED_clockid_t #define __NEED_struct_timespec #define __NEED_sigset_t #define __NEED_pthread_t @@ -64,7 +65,7 @@ extern "C" { #define PTHREAD_CANCEL_DEFERRED 0 #define PTHREAD_CANCEL_ASYNCHRONOUS 1 -#define PTHREAD_CANCELLED ((void *)-1) +#define PTHREAD_CANCELED ((void *)-1) #define PTHREAD_BARRIER_SERIAL_THREAD (-1) @@ -91,6 +92,7 @@ int pthread_mutex_unlock(pthread_mutex_t *); int pthread_mutex_trylock(pthread_mutex_t *); int pthread_mutex_timedlock(pthread_mutex_t *, const struct timespec *); int pthread_mutex_destroy(pthread_mutex_t *); +int pthread_mutex_consistent(pthread_mutex_t *); int pthread_cond_init(pthread_cond_t *, const pthread_condattr_t *); int pthread_cond_destroy(pthread_cond_t *); @@ -127,21 +129,21 @@ int pthread_setspecific(pthread_key_t, const void *); int pthread_attr_init(pthread_attr_t *); int pthread_attr_destroy(pthread_attr_t *); -int pthread_attr_getguardsize(pthread_attr_t *, size_t *); +int pthread_attr_getguardsize(const pthread_attr_t *, size_t *); int pthread_attr_setguardsize(pthread_attr_t *, size_t); -int pthread_attr_getstacksize(pthread_attr_t *, size_t *); +int pthread_attr_getstacksize(const pthread_attr_t *, size_t *); int pthread_attr_setstacksize(pthread_attr_t *, size_t); -int pthread_attr_getdetachstate(pthread_attr_t *, int *); +int pthread_attr_getdetachstate(const pthread_attr_t *, int *); int pthread_attr_setdetachstate(pthread_attr_t *, int); -int pthread_attr_getstack(pthread_attr_t *, void **, size_t *); +int pthread_attr_getstack(const pthread_attr_t *, void **, size_t *); int pthread_attr_setstack(pthread_attr_t *, void *, size_t); -int pthread_attr_getscope(pthread_attr_t *, int *); +int pthread_attr_getscope(const pthread_attr_t *, int *); int pthread_attr_setscope(pthread_attr_t *, int); -int pthread_attr_getschedpolicy(pthread_attr_t *, int *); +int pthread_attr_getschedpolicy(const pthread_attr_t *, int *); int pthread_attr_setschedpolicy(pthread_attr_t *, int); -int pthread_attr_getschedparam(pthread_attr_t *, struct sched_param *); +int pthread_attr_getschedparam(const pthread_attr_t *, struct sched_param *); int pthread_attr_setschedparam(pthread_attr_t *, const struct sched_param *); -int pthread_attr_getinheritsched(pthread_attr_t *, int *); +int pthread_attr_getinheritsched(const pthread_attr_t *, int *); int pthread_attr_setinheritsched(pthread_attr_t *, int); int pthread_mutexattr_destroy(pthread_mutexattr_t *); @@ -157,17 +159,33 @@ int pthread_mutexattr_setpshared(pthread_mutexattr_t *, int); int pthread_mutexattr_setrobust(pthread_mutexattr_t *, int); int pthread_mutexattr_settype(pthread_mutexattr_t *, int); +int pthread_condattr_init(pthread_condattr_t *); +int pthread_condattr_destroy(pthread_condattr_t *); +int pthread_condattr_setclock(pthread_condattr_t *, clockid_t); +int pthread_condattr_setpshared(pthread_condattr_t *, int); +int pthread_condattr_getclock(const pthread_condattr_t *, clockid_t *); +int pthread_condattr_getpshared(const pthread_condattr_t *, int *); + +int pthread_rwlockattr_init(pthread_rwlockattr_t *); +int pthread_rwlockattr_destroy(pthread_rwlockattr_t *); +int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, int); +int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *, int *); + int pthread_barrierattr_destroy(pthread_barrierattr_t *); int pthread_barrierattr_getpshared(const pthread_barrierattr_t *, int *); int pthread_barrierattr_init(pthread_barrierattr_t *); int pthread_barrierattr_setpshared(pthread_barrierattr_t *, int); +int pthread_atfork(void (*)(void), void (*)(void), void (*)(void)); + #include int __setjmp(void *); +#ifndef __pthread_register_cancel void __pthread_register_cancel(struct __ptcb *); void __pthread_unregister_cancel(struct __ptcb *); void __pthread_unwind_next(struct __ptcb *); +#endif #define pthread_cleanup_push(f, x) \ do { struct __ptcb __cb; void (*__f)(void *) = (f); void *__x = (x); \