* Author:
* Dick Porter (dick@ximian.com)
*
- * (C) 2002 Ximian, Inc.
+ * (C) 2002-2006 Novell, Inc.
*/
#ifndef _WAPI_PRIVATE_H_
/* Increment this whenever an incompatible change is made to the
* shared handle structure.
*/
-#define _WAPI_HANDLE_VERSION 9
+/* Next time I change this, remember to fix the process count in shared.c */
+#define _WAPI_HANDLE_VERSION 10
typedef enum {
WAPI_HANDLE_UNUSED=0,
WAPI_HANDLE_PIPE,
WAPI_HANDLE_NAMEDMUTEX,
WAPI_HANDLE_NAMEDSEM,
+ WAPI_HANDLE_NAMEDEVENT,
WAPI_HANDLE_COUNT
} WapiHandleType;
#define _WAPI_SHARED_HANDLE(type) (type == WAPI_HANDLE_PROCESS || \
type == WAPI_HANDLE_THREAD || \
type == WAPI_HANDLE_NAMEDMUTEX || \
- type == WAPI_HANDLE_NAMEDSEM)
+ type == WAPI_HANDLE_NAMEDSEM || \
+ type == WAPI_HANDLE_NAMEDEVENT)
#define _WAPI_FD_HANDLE(type) (type == WAPI_HANDLE_FILE || \
type == WAPI_HANDLE_CONSOLE || \
type == WAPI_HANDLE_PIPE)
#define _WAPI_SHARED_NAMESPACE(type) (type == WAPI_HANDLE_NAMEDMUTEX || \
- type == WAPI_HANDLE_NAMEDSEM)
+ type == WAPI_HANDLE_NAMEDSEM || \
+ type == WAPI_HANDLE_NAMEDEVENT)
typedef struct
{
* Returns the WaitForSingleObject return code.
*/
guint32 (*special_wait)(gpointer handle, guint32 timeout);
+
+ /* Called by WaitForSingleObject and WaitForMultipleObjects,
+ * if the handle in question needs some preprocessing before the
+ * signal wait.
+ */
+ void (*prewait)(gpointer handle);
};
#include <mono/io-layer/event-private.h>
struct _WapiHandle_process process;
struct _WapiHandle_namedmutex namedmutex;
struct _WapiHandle_namedsem namedsem;
+ struct _WapiHandle_namedevent namedevent;
} u;
};
/*#define _WAPI_SHARED_SEM_COLLECTION 1*/
#define _WAPI_SHARED_SEM_FILESHARE 2
#define _WAPI_SHARED_SEM_SHARED_HANDLES 3
+#define _WAPI_SHARED_SEM_PROCESS_COUNT_LOCK 6
+#define _WAPI_SHARED_SEM_PROCESS_COUNT 7
#define _WAPI_SHARED_SEM_COUNT 8 /* Leave some future expansion space */
struct _WapiHandleSharedLayout