]> pd.if.org Git - pdclib.old/blobdiff - opt/nothread/mtx_lock.c
* Test cleanups: surround the code for all functions by #ifndef REGTEST
[pdclib.old] / opt / nothread / mtx_lock.c
index 0a1afbdc4cdd60bfedf3470d8e0bc2e6f0890c32..d086986555dcd48c6808122333bd51bad77b55fd 100644 (file)
@@ -1,5 +1,5 @@
+#ifndef REGTEST\r
 #include <threads.h>\r
-#include <assert.h>\r
 \r
 int mtx_lock(mtx_t *mtx)\r
 {\r
@@ -7,4 +7,15 @@ int mtx_lock(mtx_t *mtx)
                *mtx = 1;\r
                return thrd_success;\r
        } else return thrd_error;\r
-}
\ No newline at end of file
+}\r
+#endif\r
+\r
+#ifdef TEST\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