[io-layer] Extract error (#4279)
[mono.git] / mono / metadata / w32handle.h
index 1416bf2479b77125b572d3de91da7222ae885f5e..f3f546c10a98626a934696e3868b5dd91ef2afe0 100644 (file)
 
 #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,
@@ -51,10 +55,10 @@ typedef struct
        /* 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 +113,9 @@ mono_w32handle_new (MonoW32HandleType type, gpointer handle_specific);
 gpointer
 mono_w32handle_new_fd (MonoW32HandleType type, int fd, gpointer handle_specific);
 
+gboolean
+mono_w32handle_close (gpointer handle);
+
 MonoW32HandleType
 mono_w32handle_get_type (gpointer handle);