aboutsummaryrefslogtreecommitdiff
path: root/wglarb.c
diff options
context:
space:
mode:
Diffstat (limited to 'wglarb.c')
-rw-r--r--wglarb.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/wglarb.c b/wglarb.c
index a8bc126..9f28325 100644
--- a/wglarb.c
+++ b/wglarb.c
@@ -48,21 +48,17 @@ static DWORD wglarb_intermediary_lock(void)
/* //// FINISH \\\\ */
- if( dst_mutex ) {
- /* In this case we lost the race and another thread
- * beat this thread in creating a mutex object.
- * Clean up and wait for the proper mutex. */
- ReleaseMutex(new_mutex);
- CloseHandle(new_mutex);
- goto wait_for_mutex;
+ if( !dst_mutex ) {
+ /* mutex created in one time initialization and held
+ * by calling thread. Return signaled status. */
+ return WAIT_OBJECT_0;
}
-
- /* mutex created in one time initialization and hold
- * by calling thread. Return signaled status. */
- return WAIT_OBJECT_0;
+ /* In this case we lost the race and another thread
+ * beat this thread in creating a mutex object.
+ * Clean up and wait for the proper mutex. */
+ ReleaseMutex(new_mutex);
+ CloseHandle(new_mutex);
}
-
-wait_for_mutex:
return WaitForSingleObject(wglarb_intermediary_mutex, INFINITE);
}