Flush (work in progress)
[mono.git] / mono / io-layer / process-private.h
1 /*
2  * process-private.h: Private definitions for process handles
3  *
4  * Author:
5  *      Dick Porter (dick@ximian.com)
6  *
7  * (C) 2002-2006 Novell, Inc.
8  */
9
10 #ifndef _WAPI_PROCESS_PRIVATE_H_
11 #define _WAPI_PROCESS_PRIVATE_H_
12
13 #include <config.h>
14 #include <glib.h>
15
16 /* There doesn't seem to be a defined symbol for this */
17 #define _WAPI_PROCESS_CURRENT (gpointer)0xFFFFFFFF
18
19 /* This marks a system process that we don't have a handle on */
20 /* FIXME: cope with pids > 16bit */
21 #if defined(__HAIKU__)
22 #define _WAPI_PROCESS_UNHANDLED_PID_MASK 0x7FFFFFFF
23 #else
24 #define _WAPI_PROCESS_UNHANDLED_PID_MASK 0x7FFF
25 #endif
26 #define _WAPI_PROCESS_UNHANDLED (-1 & ~_WAPI_PROCESS_UNHANDLED_PID_MASK)
27
28 extern gpointer _wapi_process_duplicate (void);
29
30 extern struct _WapiHandleOps _wapi_process_ops;
31
32 #define _WAPI_PROC_NAME_MAX_LEN _POSIX_PATH_MAX
33
34 struct _WapiHandle_process
35 {
36         pid_t id;
37         guint32 exitstatus;
38         gpointer main_thread;
39         WapiFileTime create_time;
40         WapiFileTime exit_time;
41         gchar proc_name[_WAPI_PROC_NAME_MAX_LEN];
42         size_t min_working_set;
43         size_t max_working_set;
44         gboolean waited;
45 };
46
47 extern void _wapi_process_reap (void);
48 extern void _wapi_process_signal_self (void);
49
50 #endif /* _WAPI_PROCESS_PRIVATE_H_ */