mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-26 22:38: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
|
@ -43,7 +43,7 @@ __static_yoink("nsync_mu_trylock");
|
|||
* @see pthread_cond_broadcast
|
||||
* @see pthread_cond_wait
|
||||
*/
|
||||
errno_t pthread_cond_signal(pthread_cond_t *cond) {
|
||||
errno_t _pthread_cond_signal(pthread_cond_t *cond) {
|
||||
|
||||
#if PTHREAD_USE_NSYNC
|
||||
// do nothing if pthread_cond_timedwait() hasn't been called yet
|
||||
|
@ -65,3 +65,5 @@ errno_t pthread_cond_signal(pthread_cond_t *cond) {
|
|||
cosmo_futex_wake((atomic_int *)&cond->_sequence, 1, cond->_pshared);
|
||||
return 0;
|
||||
}
|
||||
|
||||
__weak_reference(_pthread_cond_signal, pthread_cond_signal);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue