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