X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=src%2Fthread%2Fmtx_trylock.c;h=40a8b8c2977212c3006b91f5072be3a514beb5b2;hb=6aeb9c6703670649ee09b3c8575fb428168bb75c;hp=61e7694edcda2528f8c184a4e91feb7060b23051;hpb=8b0472932c1cb8cb2cc46322b21c0c4e21848522;p=musl diff --git a/src/thread/mtx_trylock.c b/src/thread/mtx_trylock.c index 61e7694e..40a8b8c2 100644 --- a/src/thread/mtx_trylock.c +++ b/src/thread/mtx_trylock.c @@ -1,14 +1,12 @@ #include "pthread_impl.h" #include -int __pthread_mutex_trylock(mtx_t *); - int mtx_trylock(mtx_t *m) { if (m->_m_type == PTHREAD_MUTEX_NORMAL) return (a_cas(&m->_m_lock, 0, EBUSY) & EBUSY) ? thrd_busy : thrd_success; - int ret = __pthread_mutex_trylock(m); + int ret = __pthread_mutex_trylock((pthread_mutex_t *)m); switch (ret) { default: return thrd_error; case 0: return thrd_success;