]> pd.if.org Git - pdclib/blob - opt/nothread/mtx_unlock.c
Unit tests
[pdclib] / opt / nothread / mtx_unlock.c
1 #include <threads.h>\r
2 \r
3 int mtx_unlock(mtx_t *mtx)\r
4 {\r
5         if(*mtx) {\r
6                 *mtx = 0;\r
7                 return thrd_success;\r
8         } else return thrd_error;\r
9 }\r
10 \r
11 #ifdef TEST\r
12 #include <_PDCLIB_test.h>\r
13 \r
14 int main( void )\r
15 {\r
16     return TEST_RESULTS;\r
17 }\r
18 \r
19 #endif