]> pd.if.org Git - pdclib.old/blob - nothread/mtx_lock.c
[gandr] s/__lp64__/__LP64__/ to match GCC define
[pdclib.old] / nothread / mtx_lock.c
1 #include <threads.h>\r
2 #include <assert.h>\r
3 \r
4 int mtx_lock(mtx_t *mtx)\r
5 {\r
6         if(*mtx == 0) {\r
7                 *mtx = 1;\r
8                 return thrd_success;\r
9         } else return thrd_error;\r
10 }