X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=platform%2Fwin32%2Ffunctions%2Fthreads%2Fmtx_init.c;h=b97b366c2a9c2430975ea497cf31fe64c0ddc89b;hp=19db3908dc0430cfa6b08be47877014999782565;hb=abc15df6b9fae3374d24c7cf5c3ab94c605b2a6d;hpb=639bad513ab9399ed9a8c588a476a10dbe6c9478 diff --git a/platform/win32/functions/threads/mtx_init.c b/platform/win32/functions/threads/mtx_init.c index 19db390..b97b366 100644 --- a/platform/win32/functions/threads/mtx_init.c +++ b/platform/win32/functions/threads/mtx_init.c @@ -1,30 +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->_State = -1; - 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