]> pd.if.org Git - pdclib/blobdiff - platform/win32/functions/threads/mtx_unlock.c
Revert reordering of declarations; for easier tracking of upstream changes.
[pdclib] / platform / win32 / functions / threads / mtx_unlock.c
index 27b7aefadb7d6ff4a277c1e6fedadb27bca74e9d..bd1e6038d3ad27c4a969468236ea7c2ecf40bbca 100644 (file)
@@ -11,25 +11,17 @@ int mtx_unlock(mtx_t *mtx)
     }\r
 \r
     mtx->_ThreadId = 0;\r
-\r
-    DWORD res = InterlockedDecrement(&mtx->_State);\r
-    if(res == (DWORD) -1) {\r
-        // We reset the state to -1; success!\r
-        return thrd_success;\r
-    }\r
-\r
     DWORD rv = SetEvent(mtx->_WaitEvHandle);\r
     if(rv == 0) {\r
         _PDCLIB_w32errno();\r
         return thrd_error;\r
     }\r
-\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