- struct _WapiHandle_namedmutex *namedmutex_handle;
- gboolean ok;
-
- MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: owning named mutex handle %p", __func__, handle);
-
- ok = _wapi_lookup_handle (handle, WAPI_HANDLE_NAMEDMUTEX,
- (gpointer *)&namedmutex_handle);
- if (ok == FALSE) {
- g_warning ("%s: error looking up named mutex handle %p",
- __func__, handle);
- return(FALSE);
- }
-
- _wapi_thread_own_mutex (handle);
-
- namedmutex_handle->tid = pthread_self ();
- namedmutex_handle->recursion++;
-
- _wapi_shared_handle_set_signal_state (handle, FALSE);
-
- MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: mutex handle %p locked %d times by %ld", __func__,
- handle, namedmutex_handle->recursion, namedmutex_handle->tid);
-
- return(TRUE);