+#ifndef REGTEST\r
#include <threads.h>\r
\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
return TEST_RESULTS;\r
}\r
\r
-#endif
\ No newline at end of file
+#endif\r