-/*
- * w32handle-namespace.c: namespace for w32handles
+/**
+ * \file
+ * namespace for w32handles
*
* Author:
* Ludovic Henry (luhenry@microsoft.com)
#include "w32mutex.h"
#include "w32semaphore.h"
#include "w32event.h"
-#include "mono/io-layer/io-layer.h"
#include "mono/utils/mono-logger-internals.h"
#include "mono/utils/mono-coop-mutex.h"
typedef struct {
gpointer ret;
MonoW32HandleType type;
- gchar *name;
+ const gchar *name;
} NamespaceSearchHandleData;
static gboolean
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",
__func__, handle);
/* we do not want the handle to be destroyed before we return it */
- mono_w32handle_ref (handle);
-
- search_data->ret = handle;
+ search_data->ret = mono_w32handle_duplicate (handle);
}
return TRUE;
}
gpointer
-mono_w32handle_namespace_search_handle (MonoW32HandleType type, gchar *name)
+mono_w32handle_namespace_search_handle (MonoW32HandleType type, const gchar *name)
{
NamespaceSearchHandleData search_data;
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;