]> pd.if.org Git - pdclib/blobdiff - opt/nothread/mtx_lock.c
PDCLib includes with quotes, not <>.
[pdclib] / opt / nothread / mtx_lock.c
index 121444e4b9a255d344825115c0ece923e512d3d7..cebc07d506551e6b80ae4192d4e5276c6e6d6b2e 100644 (file)
@@ -1,20 +1,19 @@
+#ifndef REGTEST\r
 #include <threads.h>\r
-#include <assert.h>\r
 \r
 int mtx_lock(mtx_t *mtx)\r
 {\r
-       if(*mtx == 0) {\r
-               *mtx = 1;\r
-               return thrd_success;\r
-       } else return thrd_error;\r
+       (*mtx)++;\r
+       return thrd_success;\r
 }\r
+#endif\r
 \r
 #ifdef TEST\r
-#include <_PDCLIB_test.h>\r
+#include "_PDCLIB_test.h"\r
 \r
 int main( void )\r
 {\r
     return TEST_RESULTS;\r
 }\r
 \r
-#endif
\ No newline at end of file
+#endif\r