Allow user to override pthread mutex and cond

This commit is contained in:
Justine Tunney 2024-12-23 21:57:52 -08:00
parent 4705705548
commit 55b7aa1632
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
54 changed files with 216 additions and 102 deletions

View file

@ -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);