[w32handle] Make mono_w32handle_ops_* functions private
authorLudovic Henry <ludovic@xamarin.com>
Wed, 24 Aug 2016 13:24:58 +0000 (15:24 +0200)
committerLudovic Henry <ludovic@xamarin.com>
Mon, 14 Nov 2016 15:23:32 +0000 (10:23 -0500)
mono/io-layer/sockets.c
mono/metadata/w32event-unix.c
mono/metadata/w32handle-namespace.c
mono/metadata/w32handle.c
mono/metadata/w32handle.h
mono/metadata/w32mutex-unix.c
mono/metadata/w32semaphore-unix.c

index b374973ebc67288c7b5fe9ba35c64c50d1a40856..d98ac677a2e22047432a89a717ad9b1a849f37ed 100644 (file)
@@ -130,7 +130,7 @@ static gboolean
 cleanup_close (gpointer handle, gpointer data, gpointer user_data)
 {
        if (mono_w32handle_get_type (handle) == MONO_W32HANDLE_SOCKET)
-               mono_w32handle_ops_close (handle, data);
+               mono_w32handle_force_close (handle, data);
 
        return FALSE;
 }
index 6fc2a223214e81f4e2799e225f8b6e320e8b28bc..6c95aaf56c9e97a4f48828e29a602be528d04970 100644 (file)
@@ -34,12 +34,12 @@ static gboolean event_handle_own (gpointer handle, MonoW32HandleType type, guint
        ok = mono_w32handle_lookup (handle, type, (gpointer *)&event_handle);
        if (!ok) {
                g_warning ("%s: error looking up %s handle %p",
-                       __func__, mono_w32handle_ops_typename (type), handle);
+                       __func__, mono_w32handle_get_typename (type), handle);
                return FALSE;
        }
 
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: owning %s handle %p",
-               __func__, mono_w32handle_ops_typename (type), handle);
+               __func__, mono_w32handle_get_typename (type), handle);
 
        if (!event_handle->manual) {
                g_assert (event_handle->set_count > 0);
@@ -178,7 +178,7 @@ static gpointer event_handle_create (MonoW32HandleEvent *event_handle, MonoW32Ha
        handle = mono_w32handle_new (type, event_handle);
        if (handle == INVALID_HANDLE_VALUE) {
                g_warning ("%s: error creating %s handle",
-                       __func__, mono_w32handle_ops_typename (type));
+                       __func__, mono_w32handle_get_typename (type));
                SetLastError (ERROR_GEN_FAILURE);
                return NULL;
        }
@@ -191,7 +191,7 @@ static gpointer event_handle_create (MonoW32HandleEvent *event_handle, MonoW32Ha
        mono_w32handle_unlock_handle (handle);
 
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: created %s handle %p",
-               __func__, mono_w32handle_ops_typename (type), handle);
+               __func__, mono_w32handle_get_typename (type), handle);
 
        return handle;
 }
@@ -200,7 +200,7 @@ static gpointer event_create (gboolean manual, gboolean initial)
 {
        MonoW32HandleEvent event_handle;
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: creating %s handle",
-               __func__, mono_w32handle_ops_typename (MONO_W32HANDLE_EVENT));
+               __func__, mono_w32handle_get_typename (MONO_W32HANDLE_EVENT));
        return event_handle_create (&event_handle, MONO_W32HANDLE_EVENT, manual, initial);
 }
 
@@ -210,7 +210,7 @@ static gpointer namedevent_create (gboolean manual, gboolean initial, const guni
        gchar *utf8_name;
 
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: creating %s handle",
-               __func__, mono_w32handle_ops_typename (MONO_W32HANDLE_NAMEDEVENT));
+               __func__, mono_w32handle_get_typename (MONO_W32HANDLE_NAMEDEVENT));
 
        /* w32 seems to guarantee that opening named objects can't race each other */
        mono_w32handle_namespace_lock ();
@@ -283,12 +283,12 @@ ves_icall_System_Threading_Events_SetEvent_internal (gpointer handle)
 
        if (!mono_w32handle_lookup (handle, type, (gpointer *)&event_handle)) {
                g_warning ("%s: error looking up %s handle %p",
-                       __func__, mono_w32handle_ops_typename (type), handle);
+                       __func__, mono_w32handle_get_typename (type), handle);
                return FALSE;
        }
 
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: setting %s handle %p",
-               __func__, mono_w32handle_ops_typename (type), handle);
+               __func__, mono_w32handle_get_typename (type), handle);
 
        mono_w32handle_lock_handle (handle);
 
@@ -328,21 +328,21 @@ ves_icall_System_Threading_Events_ResetEvent_internal (gpointer handle)
 
        if (!mono_w32handle_lookup (handle, type, (gpointer *)&event_handle)) {
                g_warning ("%s: error looking up %s handle %p",
-                       __func__, mono_w32handle_ops_typename (type), handle);
+                       __func__, mono_w32handle_get_typename (type), handle);
                return FALSE;
        }
 
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: resetting %s handle %p",
-               __func__, mono_w32handle_ops_typename (type), handle);
+               __func__, mono_w32handle_get_typename (type), handle);
 
        mono_w32handle_lock_handle (handle);
 
        if (!mono_w32handle_issignalled (handle)) {
                mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: no need to reset %s handle %p",
-                       __func__, mono_w32handle_ops_typename (type), handle);
+                       __func__, mono_w32handle_get_typename (type), handle);
        } else {
                mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: obtained write lock on %s handle %p",
-                       __func__, mono_w32handle_ops_typename (type), handle);
+                       __func__, mono_w32handle_get_typename (type), handle);
 
                mono_w32handle_set_signal_state (handle, FALSE, FALSE);
        }
index 1ca4e1dd8c57162da5177bc0eaacafe6fad0166c..2eb2145533b6d804c6e285cc7848803e38e1e8cf 100644 (file)
@@ -84,7 +84,7 @@ mono_w32handle_namespace_search_handle_callback (gpointer handle, gpointer data,
                if (type != search_data->type) {
                        /* Its the wrong type, so fail now */
                        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: handle %p matches name but is wrong type: %s",
-                               __func__, handle, mono_w32handle_ops_typename (type));
+                               __func__, handle, mono_w32handle_get_typename (type));
                        search_data->ret = INVALID_HANDLE_VALUE;
                } else {
                        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: handle %p matches name and type",
@@ -111,7 +111,7 @@ mono_w32handle_namespace_search_handle (MonoW32HandleType type, gchar *name)
                g_error ("%s: type %s does not have a namespace", __func__, type);
 
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Lookup for handle named [%s] type %s",
-               __func__, name, mono_w32handle_ops_typename (type));
+               __func__, name, mono_w32handle_get_typename (type));
 
        search_data.ret = NULL;
        search_data.type = type;
index f61e58f63fd98e1a577214df3202f74c9d3b8f8c..ef3b24838e1729459f9da4c99ddc7a834ce51aa7 100644 (file)
@@ -114,6 +114,15 @@ mono_w32handle_get_type (gpointer handle)
        return handle_data->type;
 }
 
+static const gchar*
+mono_w32handle_ops_typename (MonoW32HandleType type);
+
+const gchar*
+mono_w32handle_get_typename (MonoW32HandleType type)
+{
+       return mono_w32handle_ops_typename (type);
+}
+
 void
 mono_w32handle_set_signal_state (gpointer handle, gboolean state, gboolean broadcast)
 {
@@ -309,6 +318,9 @@ mono_w32handle_cleanup (void)
                g_free (private_handles [i]);
 }
 
+static gsize
+mono_w32handle_ops_typesize (MonoW32HandleType type);
+
 static void mono_w32handle_init_handle (MonoW32HandleBase *handle,
                               MonoW32HandleType type, gpointer handle_specific)
 {
@@ -651,6 +663,15 @@ mono_w32handle_unref (gpointer handle)
        }
 }
 
+static void
+mono_w32handle_ops_close (gpointer handle, gpointer data);
+
+void
+mono_w32handle_force_close (gpointer handle, gpointer data)
+{
+       mono_w32handle_ops_close (handle, data);
+}
+
 void
 mono_w32handle_register_ops (MonoW32HandleType type, MonoW32HandleOps *ops)
 {
@@ -691,7 +712,8 @@ static void (*_wapi_handle_ops_get_close_func (MonoW32HandleType type))(gpointer
        return (NULL);
 }
 
-void mono_w32handle_ops_close (gpointer handle, gpointer data)
+static void
+mono_w32handle_ops_close (gpointer handle, gpointer data)
 {
        MonoW32HandleBase *handle_data;
        MonoW32HandleType type;
@@ -708,7 +730,8 @@ void mono_w32handle_ops_close (gpointer handle, gpointer data)
        }
 }
 
-void mono_w32handle_ops_details (MonoW32HandleType type, gpointer data)
+static void
+mono_w32handle_ops_details (MonoW32HandleType type, gpointer data)
 {
        if (handle_ops[type] != NULL &&
            handle_ops[type]->details != NULL) {
@@ -716,21 +739,24 @@ void mono_w32handle_ops_details (MonoW32HandleType type, gpointer data)
        }
 }
 
-const gchar* mono_w32handle_ops_typename (MonoW32HandleType type)
+static const gchar*
+mono_w32handle_ops_typename (MonoW32HandleType type)
 {
        g_assert (handle_ops [type]);
        g_assert (handle_ops [type]->typename);
        return handle_ops [type]->typename ();
 }
 
-gsize mono_w32handle_ops_typesize (MonoW32HandleType type)
+static gsize
+mono_w32handle_ops_typesize (MonoW32HandleType type)
 {
        g_assert (handle_ops [type]);
        g_assert (handle_ops [type]->typesize);
        return handle_ops [type]->typesize ();
 }
 
-void mono_w32handle_ops_signal (gpointer handle)
+static void
+mono_w32handle_ops_signal (gpointer handle)
 {
        MonoW32HandleBase *handle_data;
        MonoW32HandleType type;
@@ -746,7 +772,8 @@ void mono_w32handle_ops_signal (gpointer handle)
        }
 }
 
-gboolean mono_w32handle_ops_own (gpointer handle, guint32 *statuscode)
+static gboolean
+mono_w32handle_ops_own (gpointer handle, guint32 *statuscode)
 {
        MonoW32HandleBase *handle_data;
        MonoW32HandleType type;
@@ -764,7 +791,8 @@ gboolean mono_w32handle_ops_own (gpointer handle, guint32 *statuscode)
        }
 }
 
-gboolean mono_w32handle_ops_isowned (gpointer handle)
+static gboolean
+mono_w32handle_ops_isowned (gpointer handle)
 {
        MonoW32HandleBase *handle_data;
        MonoW32HandleType type;
@@ -782,7 +810,7 @@ gboolean mono_w32handle_ops_isowned (gpointer handle)
        }
 }
 
-MonoW32HandleWaitRet
+static MonoW32HandleWaitRet
 mono_w32handle_ops_specialwait (gpointer handle, guint32 timeout, gboolean *alerted)
 {
        MonoW32HandleBase *handle_data;
@@ -802,7 +830,8 @@ mono_w32handle_ops_specialwait (gpointer handle, guint32 timeout, gboolean *aler
        }
 }
 
-void mono_w32handle_ops_prewait (gpointer handle)
+static void
+mono_w32handle_ops_prewait (gpointer handle)
 {
        MonoW32HandleBase *handle_data;
        MonoW32HandleType type;
index 54386fabeb15e2ccc70872eba4f4cef1d5918ffe..ce7d76ec68824cebc75436a4399d38e2116dbd82 100644 (file)
@@ -108,6 +108,9 @@ mono_w32handle_new_fd (MonoW32HandleType type, int fd, gpointer handle_specific)
 MonoW32HandleType
 mono_w32handle_get_type (gpointer handle);
 
+const gchar*
+mono_w32handle_get_typename (MonoW32HandleType type);
+
 gboolean
 mono_w32handle_lookup (gpointer handle, MonoW32HandleType type, gpointer *handle_specific);
 
@@ -130,31 +133,7 @@ gboolean
 mono_w32handle_test_capabilities (gpointer handle, MonoW32HandleCapability caps);
 
 void
-mono_w32handle_ops_close (gpointer handle, gpointer data);
-
-void
-mono_w32handle_ops_signal (gpointer handle);
-
-gboolean
-mono_w32handle_ops_own (gpointer handle, guint32 *statuscode);
-
-gboolean
-mono_w32handle_ops_isowned (gpointer handle);
-
-MonoW32HandleWaitRet
-mono_w32handle_ops_specialwait (gpointer handle, guint32 timeout, gboolean *alerted);
-
-void
-mono_w32handle_ops_prewait (gpointer handle);
-
-void
-mono_w32handle_ops_details (MonoW32HandleType type, gpointer data);
-
-const gchar*
-mono_w32handle_ops_typename (MonoW32HandleType type);
-
-gsize
-mono_w32handle_ops_typesize (MonoW32HandleType type);
+mono_w32handle_force_close (gpointer handle, gpointer data);
 
 void
 mono_w32handle_set_signal_state (gpointer handle, gboolean state, gboolean broadcast);
index 35ddea5ee1487230eb02a19493172c15880b8b49..d27fd5b8a586dbb182643b647e97dcafadd97d95 100644 (file)
@@ -66,12 +66,12 @@ mutex_handle_own (gpointer handle, MonoW32HandleType type, guint32 *statuscode)
        *statuscode = WAIT_OBJECT_0;
 
        if (!mono_w32handle_lookup (handle, type, (gpointer *)&mutex_handle)) {
-               g_warning ("%s: error looking up %s handle %p", __func__, mono_w32handle_ops_typename (type), handle);
+               g_warning ("%s: error looking up %s handle %p", __func__, mono_w32handle_get_typename (type), handle);
                return FALSE;
        }
 
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: owning %s handle %p, before: [tid: %p, recursion: %d], after: [tid: %p, recursion: %d], abandoned: %s",
-               __func__, mono_w32handle_ops_typename (type), handle, (gpointer) mutex_handle->tid, mutex_handle->recursion, (gpointer) pthread_self (), mutex_handle->recursion + 1, mutex_handle->abandoned ? "true" : "false");
+               __func__, mono_w32handle_get_typename (type), handle, (gpointer) mutex_handle->tid, mutex_handle->recursion, (gpointer) pthread_self (), mutex_handle->recursion + 1, mutex_handle->abandoned ? "true" : "false");
 
        if (mutex_handle->recursion != 0) {
                g_assert (pthread_equal (pthread_self (), mutex_handle->tid));
@@ -99,20 +99,20 @@ mutex_handle_is_owned (gpointer handle, MonoW32HandleType type)
        MonoW32HandleMutex *mutex_handle;
 
        if (!mono_w32handle_lookup (handle, type, (gpointer *)&mutex_handle)) {
-               g_warning ("%s: error looking up %s handle %p", __func__, mono_w32handle_ops_typename (type), handle);
+               g_warning ("%s: error looking up %s handle %p", __func__, mono_w32handle_get_typename (type), handle);
                return FALSE;
        }
 
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: testing ownership %s handle %p",
-               __func__, mono_w32handle_ops_typename (type), handle);
+               __func__, mono_w32handle_get_typename (type), handle);
 
        if (mutex_handle->recursion > 0 && pthread_equal (mutex_handle->tid, pthread_self ())) {
                mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: %s handle %p owned by %p",
-                       __func__, mono_w32handle_ops_typename (type), handle, (gpointer) pthread_self ());
+                       __func__, mono_w32handle_get_typename (type), handle, (gpointer) pthread_self ());
                return TRUE;
        } else {
                mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: %s handle %p not owned by %p, tid: %p recursion: %d",
-                       __func__, mono_w32handle_ops_typename (type), handle, (gpointer) pthread_self (), (gpointer) mutex_handle->tid, mutex_handle->recursion);
+                       __func__, mono_w32handle_get_typename (type), handle, (gpointer) pthread_self (), (gpointer) mutex_handle->tid, mutex_handle->recursion);
                return FALSE;
        }
 }
@@ -161,12 +161,12 @@ static void mutex_handle_prewait (gpointer handle, MonoW32HandleType type)
 
        if (!mono_w32handle_lookup (handle, type, (gpointer *)&mutex_handle)) {
                g_warning ("%s: error looking up %s handle %p",
-                       __func__, mono_w32handle_ops_typename (type), handle);
+                       __func__, mono_w32handle_get_typename (type), handle);
                return;
        }
 
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: pre-waiting %s handle %p, owned? %s",
-               __func__, mono_w32handle_ops_typename (type), handle, mutex_handle->recursion != 0 ? "true" : "false");
+               __func__, mono_w32handle_get_typename (type), handle, mutex_handle->recursion != 0 ? "true" : "false");
 }
 
 /* The shared state is not locked when prewait methods are called */
@@ -273,7 +273,7 @@ static gpointer mutex_handle_create (MonoW32HandleMutex *mutex_handle, MonoW32Ha
        handle = mono_w32handle_new (type, mutex_handle);
        if (handle == INVALID_HANDLE_VALUE) {
                g_warning ("%s: error creating %s handle",
-                       __func__, mono_w32handle_ops_typename (type));
+                       __func__, mono_w32handle_get_typename (type));
                SetLastError (ERROR_GEN_FAILURE);
                return NULL;
        }
@@ -288,7 +288,7 @@ static gpointer mutex_handle_create (MonoW32HandleMutex *mutex_handle, MonoW32Ha
        mono_w32handle_unlock_handle (handle);
 
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: created %s handle %p",
-               __func__, mono_w32handle_ops_typename (type), handle);
+               __func__, mono_w32handle_get_typename (type), handle);
 
        return handle;
 }
@@ -297,7 +297,7 @@ static gpointer mutex_create (gboolean owned)
 {
        MonoW32HandleMutex mutex_handle;
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: creating %s handle",
-               __func__, mono_w32handle_ops_typename (MONO_W32HANDLE_MUTEX));
+               __func__, mono_w32handle_get_typename (MONO_W32HANDLE_MUTEX));
        return mutex_handle_create (&mutex_handle, MONO_W32HANDLE_MUTEX, owned);
 }
 
@@ -307,7 +307,7 @@ static gpointer namedmutex_create (gboolean owned, const gunichar2 *name)
        gchar *utf8_name;
 
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: creating %s handle",
-               __func__, mono_w32handle_ops_typename (MONO_W32HANDLE_NAMEDMUTEX));
+               __func__, mono_w32handle_get_typename (MONO_W32HANDLE_NAMEDMUTEX));
 
        /* w32 seems to guarantee that opening named objects can't race each other */
        mono_w32handle_namespace_lock ();
@@ -389,12 +389,12 @@ ves_icall_System_Threading_Mutex_ReleaseMutex_internal (gpointer handle)
 
        if (!mono_w32handle_lookup (handle, type, (gpointer *)&mutex_handle)) {
                g_warning ("%s: error looking up %s handle %p",
-                       __func__, mono_w32handle_ops_typename (type), handle);
+                       __func__, mono_w32handle_get_typename (type), handle);
                return FALSE;
        }
 
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: releasing %s handle %p, tid: %p recursion: %d",
-               __func__, mono_w32handle_ops_typename (type), handle, (gpointer) mutex_handle->tid, mutex_handle->recursion);
+               __func__, mono_w32handle_get_typename (type), handle, (gpointer) mutex_handle->tid, mutex_handle->recursion);
 
        mono_w32handle_lock_handle (handle);
 
@@ -407,7 +407,7 @@ ves_icall_System_Threading_Mutex_ReleaseMutex_internal (gpointer handle)
                ret = FALSE;
 
                mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: we don't own %s handle %p (owned by %ld, me %ld)",
-                           __func__, mono_w32handle_ops_typename (type), handle, (long)mutex_handle->tid, (long)tid);
+                           __func__, mono_w32handle_get_typename (type), handle, (long)mutex_handle->tid, (long)tid);
        } else {
                ret = TRUE;
 
@@ -418,7 +418,7 @@ ves_icall_System_Threading_Mutex_ReleaseMutex_internal (gpointer handle)
                        thread_disown_mutex (mono_thread_internal_current (), handle);
 
                        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: unlocking %s handle %p, tid: %p recusion : %d",
-                               __func__, mono_w32handle_ops_typename (type), handle, (gpointer) mutex_handle->tid, mutex_handle->recursion);
+                               __func__, mono_w32handle_get_typename (type), handle, (gpointer) mutex_handle->tid, mutex_handle->recursion);
 
                        mutex_handle->tid = 0;
                        mono_w32handle_set_signal_state (handle, TRUE, FALSE);
@@ -499,11 +499,11 @@ mono_w32mutex_abandon (void)
 
                if (!mono_w32handle_lookup (handle, type, (gpointer *)&mutex_handle)) {
                        g_error ("%s: error looking up %s handle %p",
-                               __func__, mono_w32handle_ops_typename (type), handle);
+                               __func__, mono_w32handle_get_typename (type), handle);
                }
 
                mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: abandoning %s handle %p",
-                       __func__, mono_w32handle_ops_typename (type), handle);
+                       __func__, mono_w32handle_get_typename (type), handle);
 
                tid = MONO_UINT_TO_NATIVE_THREAD_ID (internal->tid);
 
@@ -522,7 +522,7 @@ mono_w32mutex_abandon (void)
                thread_disown_mutex (internal, handle);
 
                mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: abandoned %s handle %p",
-                       __func__, mono_w32handle_ops_typename (type), handle);
+                       __func__, mono_w32handle_get_typename (type), handle);
 
                mono_w32handle_unlock_handle (handle);
        }
index 7fddcf988d364845cdf520116e6636c5b9c67bcb..f0a93d1f985384045bcff34f5d44debd2d2d3270 100644 (file)
@@ -32,12 +32,12 @@ static gboolean sem_handle_own (gpointer handle, MonoW32HandleType type, guint32
 
        if (!mono_w32handle_lookup (handle, type, (gpointer *)&sem_handle)) {
                g_warning ("%s: error looking up %s handle %p",
-                       __func__, mono_w32handle_ops_typename (type), handle);
+                       __func__, mono_w32handle_get_typename (type), handle);
                return FALSE;
        }
 
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: owning %s handle %p",
-               __func__, mono_w32handle_ops_typename (type), handle);
+               __func__, mono_w32handle_get_typename (type), handle);
 
        sem_handle->val--;
 
@@ -147,7 +147,7 @@ sem_handle_create (MonoW32HandleSemaphore *sem_handle, MonoW32HandleType type, g
        handle = mono_w32handle_new (type, sem_handle);
        if (handle == INVALID_HANDLE_VALUE) {
                g_warning ("%s: error creating %s handle",
-                       __func__, mono_w32handle_ops_typename (type));
+                       __func__, mono_w32handle_get_typename (type));
                SetLastError (ERROR_GEN_FAILURE);
                return NULL;
        }
@@ -160,7 +160,7 @@ sem_handle_create (MonoW32HandleSemaphore *sem_handle, MonoW32HandleType type, g
        mono_w32handle_unlock_handle (handle);
 
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: created %s handle %p",
-               __func__, mono_w32handle_ops_typename (type), handle);
+               __func__, mono_w32handle_get_typename (type), handle);
 
        return handle;
 }
@@ -170,7 +170,7 @@ sem_create (gint32 initial, gint32 max)
 {
        MonoW32HandleSemaphore sem_handle;
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: creating %s handle, initial %d max %d",
-               __func__, mono_w32handle_ops_typename (MONO_W32HANDLE_SEM), initial, max);
+               __func__, mono_w32handle_get_typename (MONO_W32HANDLE_SEM), initial, max);
        return sem_handle_create (&sem_handle, MONO_W32HANDLE_SEM, initial, max);
 }
 
@@ -181,7 +181,7 @@ namedsem_create (gint32 initial, gint32 max, const gunichar2 *name)
        gchar *utf8_name;
 
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: creating %s handle, initial %d max %d name \"%s\"",
-                   __func__, mono_w32handle_ops_typename (MONO_W32HANDLE_NAMEDSEM), initial, max, (const char*)name);
+                   __func__, mono_w32handle_get_typename (MONO_W32HANDLE_NAMEDSEM), initial, max, (const char*)name);
 
        /* w32 seems to guarantee that opening named objects can't race each other */
        mono_w32handle_namespace_lock ();
@@ -279,7 +279,7 @@ ves_icall_System_Threading_Semaphore_ReleaseSemaphore_internal (gpointer handle,
        }
 
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: releasing %s handle %p",
-               __func__, mono_w32handle_ops_typename (type), handle);
+               __func__, mono_w32handle_get_typename (type), handle);
 
        mono_w32handle_lock_handle (handle);
 
@@ -291,12 +291,12 @@ ves_icall_System_Threading_Semaphore_ReleaseSemaphore_internal (gpointer handle,
        /* No idea why max is signed, but thats the spec :-( */
        if (sem_handle->val + releaseCount > (guint32)sem_handle->max) {
                mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: %s handle %p val %d count %d max %d, max value would be exceeded",
-                       __func__, mono_w32handle_ops_typename (type), handle, sem_handle->val, releaseCount, sem_handle->max);
+                       __func__, mono_w32handle_get_typename (type), handle, sem_handle->val, releaseCount, sem_handle->max);
 
                ret = FALSE;
        } else {
                mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: %s handle %p val %d count %d max %d",
-                       __func__, mono_w32handle_ops_typename (type), handle, sem_handle->val, releaseCount, sem_handle->max);
+                       __func__, mono_w32handle_get_typename (type), handle, sem_handle->val, releaseCount, sem_handle->max);
 
                sem_handle->val += releaseCount;
                mono_w32handle_set_signal_state (handle, TRUE, TRUE);