mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-26 14:28:30 +00:00
Allow user to override pthread mutex and cond
This commit is contained in:
parent
4705705548
commit
55b7aa1632
54 changed files with 216 additions and 102 deletions
|
@ -98,6 +98,11 @@ extern _Atomic(unsigned) _pthread_count;
|
|||
extern struct PosixThread _pthread_static;
|
||||
extern _Atomic(pthread_key_dtor) _pthread_key_dtor[PTHREAD_KEYS_MAX];
|
||||
|
||||
int _pthread_cond_signal(pthread_cond_t *) libcesque paramsnonnull();
|
||||
int _pthread_mutex_lock(pthread_mutex_t *) libcesque paramsnonnull();
|
||||
int _pthread_mutex_trylock(pthread_mutex_t *) libcesque paramsnonnull();
|
||||
int _pthread_mutex_unlock(pthread_mutex_t *) libcesque paramsnonnull();
|
||||
int _pthread_mutex_wipe_np(pthread_mutex_t *) libcesque paramsnonnull();
|
||||
int _pthread_reschedule(struct PosixThread *) libcesque;
|
||||
int _pthread_setschedparam_freebsd(int, int, const struct sched_param *);
|
||||
int _pthread_tid(struct PosixThread *) libcesque;
|
||||
|
@ -111,6 +116,13 @@ void _pthread_onfork_prepare(void) libcesque;
|
|||
void _pthread_unlock(void) libcesque;
|
||||
void _pthread_zombify(struct PosixThread *) libcesque;
|
||||
|
||||
int _pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *) libcesque
|
||||
paramsnonnull();
|
||||
|
||||
int _pthread_cond_timedwait(pthread_cond_t *, pthread_mutex_t *,
|
||||
const struct timespec *) libcesque
|
||||
paramsnonnull((1, 2));
|
||||
|
||||
forceinline pureconst struct PosixThread *_pthread_self(void) {
|
||||
return (struct PosixThread *)__get_tls()->tib_pthread;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue