2004-03-20 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / mono / io-layer / shared.h
1 /*
2  * shared.h:  Shared memory handle, and daemon launching
3  *
4  * Author:
5  *      Dick Porter (dick@ximian.com)
6  *
7  * (C) 2002 Ximian, Inc.
8  */
9
10 #ifndef _WAPI_SHARED_H_
11 #define _WAPI_SHARED_H_
12
13 #include <mono/io-layer/wapi-private.h>
14
15 struct _WapiScratchHeader 
16 {
17         /* These two can be merged */
18         guint32 flags;
19         guint32 length;
20 };
21
22 enum {
23         WAPI_SHM_SCRATCH_FREE=0x1,
24 };
25
26 typedef enum {
27         WAPI_SHM_DATA,
28         WAPI_SHM_SCRATCH
29 } _wapi_shm_t;
30
31 extern guchar *_wapi_shm_file (_wapi_shm_t type, guint32 segment);
32 extern gpointer _wapi_shm_file_map (_wapi_shm_t type, guint32 segment,
33                                     gboolean *created, off_t *size);
34 extern gpointer _wapi_shm_file_expand (gpointer mem, _wapi_shm_t type,
35                                        guint32 segment, guint32 old_len,
36                                        guint32 new_len);
37 extern gboolean _wapi_shm_attach (struct _WapiHandleShared_list **data,
38                                   struct _WapiHandleScratch **scratch);
39 extern void _wapi_shm_destroy (void);
40
41 #endif /* _WAPI_SHARED_H_ */