X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=platform%2Fwin32%2Ffunctions%2Fthreads%2Fmtx_init.c;h=b97b366c2a9c2430975ea497cf31fe64c0ddc89b;hp=72055519128933d52d93dcbfb3e3feb94d9bca02;hb=abc15df6b9fae3374d24c7cf5c3ab94c605b2a6d;hpb=8894c921674bb116d0a7b8f23a55311e7a768019 diff --git a/platform/win32/functions/threads/mtx_init.c b/platform/win32/functions/threads/mtx_init.c index 7205551..b97b366 100644 --- a/platform/win32/functions/threads/mtx_init.c +++ b/platform/win32/functions/threads/mtx_init.c @@ -1,29 +1,29 @@ -#ifndef REGTEST -#include -#include - -int mtx_init(mtx_t *mtx, int type) -{ - mtx->_WaitEvHandle = CreateEvent(NULL, - /* bManualReset*/ FALSE, - /* bInitialState*/ FALSE, - /* name*/ NULL); - if(mtx->_WaitEvHandle == NULL) - return thrd_error; - - mtx->_ThreadId = 0; - mtx->_NestCount = 0;; - - return thrd_success; -} -#endif - -#ifdef TEST -#include "_PDCLIB_test.h" - -int main( void ) -{ - return TEST_RESULTS; -} - +#ifndef REGTEST +#include +#include + +int mtx_init(mtx_t *mtx, int type) +{ + mtx->_WaitEvHandle = CreateEvent(NULL, + /* bManualReset*/ FALSE, + /* bInitialState*/ FALSE, + /* name*/ NULL); + if(mtx->_WaitEvHandle == NULL) + return thrd_error; + + mtx->_ThreadId = 0; + mtx->_NestCount = 0;; + + return thrd_success; +} +#endif + +#ifdef TEST +#include "_PDCLIB_test.h" + +int main( void ) +{ + return TEST_RESULTS; +} + #endif \ No newline at end of file