2 * Wine server processes
4 * Copyright (C) 1999 Alexandre Julliard
7 #ifndef __WINE_SERVER_PROCESS_H
8 #define __WINE_SERVER_PROCESS_H
10 #ifndef __WINE_SERVER__
11 #error This file can only be used in the Wine server
16 /* process structures */
20 struct object obj
; /* object header */
21 struct process
*next
; /* system-wide process list */
23 struct thread
*thread_list
; /* head of the thread list */
24 struct process
*debug_next
; /* per-debugger process list */
25 struct process
*debug_prev
;
26 struct thread
*debugger
; /* thread debugging this process */
27 struct object
*handles
; /* handle entries */
28 int exit_code
; /* process exit code */
29 int running_threads
; /* number of threads running in this process */
30 struct timeval start_time
; /* absolute time at process start */
31 struct timeval end_time
; /* absolute time at process end */
32 int priority
; /* priority class */
33 int affinity
; /* process affinity mask */
34 int suspend
; /* global process suspend count */
35 struct object
*console_in
; /* console input */
36 struct object
*console_out
; /* console output */
37 struct new_process_request
*info
; /* startup info (freed after startup) */
40 struct process_snapshot
42 struct process
*process
; /* process ptr */
43 struct process
*parent
; /* process parent */
44 int threads
; /* number of threads */
45 int priority
; /* priority class */
48 /* process functions */
50 extern struct process
*create_initial_process(void);
51 extern struct process
*get_process_from_id( void *id
);
52 extern struct process
*get_process_from_handle( int handle
, unsigned int access
);
53 extern int process_set_debugger( struct process
*process
, struct thread
*thread
);
54 extern void add_process_thread( struct process
*process
,
55 struct thread
*thread
);
56 extern void remove_process_thread( struct process
*process
,
57 struct thread
*thread
);
58 extern void suspend_process( struct process
*process
);
59 extern void resume_process( struct process
*process
);
60 extern void kill_process( struct process
*process
, int exit_code
);
61 extern struct process_snapshot
*process_snap( int *count
);
63 #endif /* __WINE_SERVER_PROCESS_H */