]> pd.if.org Git - pdclib/blob - platform/win32/functions/threads/mtx_init.c
PDCLib includes with quotes, not <>.
[pdclib] / platform / win32 / functions / threads / mtx_init.c
1 #ifndef REGTEST\r
2 #include <threads.h>\r
3 #include <windows.h>\r
4 \r
5 int mtx_init(mtx_t *mtx, int type)\r
6 {\r
7     mtx->_WaitEvHandle = CreateEvent(NULL, \r
8         /* bManualReset*/   FALSE, \r
9         /* bInitialState*/  FALSE, \r
10         /* name*/           NULL);\r
11     if(mtx->_WaitEvHandle == NULL)\r
12         return thrd_error;\r
13     \r
14     mtx->_ThreadId     = 0;\r
15     mtx->_NestCount    = 0;;\r
16 \r
17     return thrd_success;\r
18 }\r
19 #endif\r
20 \r
21 #ifdef TEST\r
22 #include "_PDCLIB_test.h"\r
23 \r
24 int main( void )\r
25 {\r
26     return TEST_RESULTS;\r
27 }\r
28 \r
29 #endif