X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=opt%2Fpthreads%2Fmtx_unlock.c;fp=opt%2Fpthreads%2Fmtx_unlock.c;h=0da592a33b838fc35de1ef21f43fa14e07df7678;hp=0000000000000000000000000000000000000000;hb=a3b310f13d9001554fe24f3eebab8c0bebac72ca;hpb=c2d0eabd70beb268554939e4cc7fdc0732b21141 diff --git a/opt/pthreads/mtx_unlock.c b/opt/pthreads/mtx_unlock.c new file mode 100644 index 0000000..0da592a --- /dev/null +++ b/opt/pthreads/mtx_unlock.c @@ -0,0 +1,21 @@ +#ifndef REGTEST +#include +#include + +int mtx_unlock(mtx_t *mtx) +{ + if(pthread_mutex_unlock(mtx) == 0) + return thrd_success; + return thrd_error; +} +#endif + +#ifdef TEST +#include <_PDCLIB_test.h> + +int main( void ) +{ + return TEST_RESULTS; +} + +#endif