]> pd.if.org Git - pdclib/blobdiff - platform/win32/functions/threads/mtx_unlock.c
dos2unix
[pdclib] / platform / win32 / functions / threads / mtx_unlock.c
index bd1e6038d3ad27c4a969468236ea7c2ecf40bbca..dcbdc78a2a7c00dc9494887476fc0858cedc3a53 100644 (file)
@@ -1,31 +1,31 @@
-#ifndef REGTEST\r
-#include <threads.h>\r
-#include <windows.h>\r
-\r
-extern void _PDCLIB_w32errno( void );\r
-int mtx_unlock(mtx_t *mtx)\r
-{\r
-    if(mtx->_NestCount) {\r
-        mtx->_NestCount--;\r
-        return thrd_success;\r
-    }\r
-\r
-    mtx->_ThreadId = 0;\r
-    DWORD rv = SetEvent(mtx->_WaitEvHandle);\r
-    if(rv == 0) {\r
-        _PDCLIB_w32errno();\r
-        return thrd_error;\r
-    }\r
-    return thrd_success;\r
-}\r
-#endif\r
-\r
-#ifdef TEST\r
-#include "_PDCLIB_test.h"\r
-\r
-int main( void )\r
-{\r
-    return TEST_RESULTS;\r
-}\r
-\r
+#ifndef REGTEST
+#include <threads.h>
+#include <windows.h>
+
+extern void _PDCLIB_w32errno( void );
+int mtx_unlock(mtx_t *mtx)
+{
+    if(mtx->_NestCount) {
+        mtx->_NestCount--;
+        return thrd_success;
+    }
+
+    mtx->_ThreadId = 0;
+    DWORD rv = SetEvent(mtx->_WaitEvHandle);
+    if(rv == 0) {
+        _PDCLIB_w32errno();
+        return thrd_error;
+    }
+    return thrd_success;
+}
+#endif
+
+#ifdef TEST
+#include "_PDCLIB_test.h"
+
+int main( void )
+{
+    return TEST_RESULTS;
+}
+
 #endif
\ No newline at end of file