X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;ds=sidebyside;f=platform%2Fwin32%2Ffunctions%2Fthreads%2Fmtx_unlock.c;h=dcbdc78a2a7c00dc9494887476fc0858cedc3a53;hb=abc15df6b9fae3374d24c7cf5c3ab94c605b2a6d;hp=1222c292ea42ffa47b934fb154ad3df68ef58a69;hpb=3b357986c8ac26f3aee1033c49c28f58c3cd2fb4;p=pdclib diff --git a/platform/win32/functions/threads/mtx_unlock.c b/platform/win32/functions/threads/mtx_unlock.c index 1222c29..dcbdc78 100644 --- a/platform/win32/functions/threads/mtx_unlock.c +++ b/platform/win32/functions/threads/mtx_unlock.c @@ -1,31 +1,31 @@ -#ifndef REGTEST -#include -#include - -extern void _PDCLIB_w32errno( void ); -int mtx_unlock(mtx_t *mtx) -{ - if(mtx->_NestCount) { - mtx->_NestCount--; - return thrd_success; - } - - mtx->_ThreadId = 0; - DWORD rv = SetEvent(mtx->_WaitEvHandle); - if(rv == 0) { - _PDCLIB_w32errno(); - return thrd_error; - } - return thrd_success; -} -#endif - -#ifdef TEST -#include <_PDCLIB_test.h> - -int main( void ) -{ - return TEST_RESULTS; -} - +#ifndef REGTEST +#include +#include + +extern void _PDCLIB_w32errno( void ); +int mtx_unlock(mtx_t *mtx) +{ + if(mtx->_NestCount) { + mtx->_NestCount--; + return thrd_success; + } + + mtx->_ThreadId = 0; + DWORD rv = SetEvent(mtx->_WaitEvHandle); + if(rv == 0) { + _PDCLIB_w32errno(); + return thrd_error; + } + return thrd_success; +} +#endif + +#ifdef TEST +#include "_PDCLIB_test.h" + +int main( void ) +{ + return TEST_RESULTS; +} + #endif \ No newline at end of file