Revert "[w32handle] Remove use of w32handle for File, Console, Pipe and Socket (...
[mono.git] / mono / metadata / w32handle.h
index 1416bf2479b77125b572d3de91da7222ae885f5e..b7df9a8810e50fbd9a1400cbdf9e443e0cbf732e 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #ifndef _MONO_METADATA_W32HANDLE_H_
 #define _MONO_METADATA_W32HANDLE_H_
 
 #define MONO_W32HANDLE_MAXIMUM_WAIT_OBJECTS 64
 
+#ifndef MONO_INFINITE_WAIT
+#define MONO_INFINITE_WAIT ((guint32) 0xFFFFFFFF)
+#endif
+
 typedef enum {
        MONO_W32HANDLE_UNUSED = 0,
        MONO_W32HANDLE_FILE,
@@ -46,15 +53,15 @@ typedef struct
        void (*close)(gpointer handle, gpointer data);
 
        /* mono_w32handle_signal_and_wait */
-       void (*signal)(gpointer signal);
+       void (*signal)(gpointer signal, gpointer data);
 
        /* Called by mono_w32handle_wait_one and mono_w32handle_wait_multiple,
         * with the handle locked (shared handles aren't locked.)
         * Returns TRUE if ownership was established, false otherwise.
-        * If TRUE, *statuscode contains a status code such as
+        * If TRUE, *abandoned contains a status code such as
         * WAIT_OBJECT_0 or WAIT_ABANDONED_0.
         */
-       gboolean (*own_handle)(gpointer handle, guint32 *statuscode);
+       gboolean (*own_handle)(gpointer handle, gboolean *abandoned);
 
        /* Called by mono_w32handle_wait_one and mono_w32handle_wait_multiple, if the
         * handle in question is "ownable" (ie mutexes), to see if the current
@@ -109,6 +116,12 @@ mono_w32handle_new (MonoW32HandleType type, gpointer handle_specific);
 gpointer
 mono_w32handle_new_fd (MonoW32HandleType type, int fd, gpointer handle_specific);
 
+gpointer
+mono_w32handle_duplicate (gpointer handle);
+
+gboolean
+mono_w32handle_close (gpointer handle);
+
 MonoW32HandleType
 mono_w32handle_get_type (gpointer handle);
 
@@ -124,12 +137,6 @@ mono_w32handle_foreach (gboolean (*on_each)(gpointer handle, gpointer data, gpoi
 void
 mono_w32handle_dump (void);
 
-void
-mono_w32handle_ref (gpointer handle);
-
-void
-mono_w32handle_unref (gpointer handle);
-
 void
 mono_w32handle_register_capabilities (MonoW32HandleType type, MonoW32HandleCapability caps);