]> pd.if.org Git - pdclib/blobdiff - opt/nothread/mtx_trylock.c
PDCLib includes with quotes, not <>.
[pdclib] / opt / nothread / mtx_trylock.c
index bffc8b85b139b430df32c437585dd70fe06308b5..3224e4732654c598b0fefda211fe3da2e18a8c1e 100644 (file)
@@ -3,21 +3,17 @@
 \r
 int mtx_trylock(mtx_t *mtx)\r
 {\r
-       if(*mtx) {\r
-               return thrd_error;\r
-       } else {\r
-               *mtx = 1;\r
-               return thrd_success;\r
-       }\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