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