[llvm] Fix the loadable llvm build.
[mono.git] / mono / io-layer / events.c
index fa3ae9d637c6f1469fa08e95e3f4a4d25426420c..ac8068d41a472696b34584307a22d514cfe4f6b8 100644 (file)
@@ -190,8 +190,6 @@ static gpointer event_create (WapiSecurityAttributes *security G_GNUC_UNUSED,
                return(NULL);
        }
 
-       pthread_cleanup_push ((void(*)(void *))_wapi_handle_unlock_handle,
-                             handle);
        thr_ret = _wapi_handle_lock_handle (handle);
        g_assert (thr_ret == 0);
        
@@ -203,7 +201,6 @@ static gpointer event_create (WapiSecurityAttributes *security G_GNUC_UNUSED,
 
        thr_ret = _wapi_handle_unlock_handle (handle);
        g_assert (thr_ret == 0);
-       pthread_cleanup_pop (0);
 
        return(handle);
 }
@@ -364,8 +361,6 @@ static gboolean event_pulse (gpointer handle)
                return(FALSE);
        }
        
-       pthread_cleanup_push ((void(*)(void *))_wapi_handle_unlock_handle,
-                             handle);
        thr_ret = _wapi_handle_lock_handle (handle);
        g_assert (thr_ret == 0);
 
@@ -381,8 +376,6 @@ static gboolean event_pulse (gpointer handle)
        thr_ret = _wapi_handle_unlock_handle (handle);
        g_assert (thr_ret == 0);
        
-       pthread_cleanup_pop (0);
-       
        if (event_handle->manual == TRUE) {
                /* For a manual-reset event, we're about to try and
                 * get the handle lock again, so give other threads a
@@ -399,7 +392,6 @@ static gboolean event_pulse (gpointer handle)
                DEBUG ("%s: Obtained write lock on event handle %p",
                           __func__, handle);
 
-               pthread_cleanup_push ((void(*)(void *))_wapi_handle_unlock_handle, handle);
                thr_ret = _wapi_handle_lock_handle (handle);
                g_assert (thr_ret == 0);
                
@@ -407,7 +399,6 @@ static gboolean event_pulse (gpointer handle)
 
                thr_ret = _wapi_handle_unlock_handle (handle);
                g_assert (thr_ret == 0);
-               pthread_cleanup_pop (0);
        }
 
        return(TRUE);
@@ -518,8 +509,6 @@ static gboolean event_reset (gpointer handle)
 
        DEBUG ("%s: Resetting event handle %p", __func__, handle);
 
-       pthread_cleanup_push ((void(*)(void *))_wapi_handle_unlock_handle,
-                             handle);
        thr_ret = _wapi_handle_lock_handle (handle);
        g_assert (thr_ret == 0);
        
@@ -538,8 +527,6 @@ static gboolean event_reset (gpointer handle)
        thr_ret = _wapi_handle_unlock_handle (handle);
        g_assert (thr_ret == 0);
        
-       pthread_cleanup_pop (0);
-       
        return(TRUE);
 }
 
@@ -621,8 +608,6 @@ static gboolean event_set (gpointer handle)
                return(FALSE);
        }
        
-       pthread_cleanup_push ((void(*)(void *))_wapi_handle_unlock_handle,
-                             handle);
        thr_ret = _wapi_handle_lock_handle (handle);
        g_assert (thr_ret == 0);
 
@@ -638,8 +623,6 @@ static gboolean event_set (gpointer handle)
        thr_ret = _wapi_handle_unlock_handle (handle);
        g_assert (thr_ret == 0);
        
-       pthread_cleanup_pop (0);
-
        return(TRUE);
 }