Added support for FreeBSD 3.0 to DEBUG_checkmap_bad().
[wine.git] / server / process.h
blobb9b44fc1b13722b986b29648996edf41aed4dfc9
1 /*
2 * Wine server processes
4 * Copyright (C) 1999 Alexandre Julliard
5 */
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
12 #endif
14 #include "object.h"
16 /* process structures */
18 struct handle_entry;
20 struct process
22 struct object obj; /* object header */
23 struct process *next; /* system-wide process list */
24 struct process *prev;
25 struct thread *thread_list; /* head of the thread list */
26 struct process *debug_next; /* per-debugger process list */
27 struct process *debug_prev;
28 struct thread *debugger; /* thread debugging this process */
29 struct handle_entry *entries; /* handle entries */
30 int handle_last; /* last valid handle */
31 int handle_count; /* allocated table entries */
32 int exit_code; /* process exit code */
33 int running_threads; /* number of threads running in this process */
34 struct timeval start_time; /* absolute time at process start */
35 struct timeval end_time; /* absolute time at process end */
36 int priority; /* priority class */
37 int affinity; /* process affinity mask */
38 int suspend; /* global process suspend count */
39 struct object *console_in; /* console input */
40 struct object *console_out; /* console output */
41 struct new_process_request *info; /* startup info (freed after startup) */
44 struct process_snapshot
46 struct process *process; /* process ptr */
47 struct process *parent; /* process parent */
48 int threads; /* number of threads */
49 int priority; /* priority class */
52 /* process functions */
54 extern struct process *create_initial_process(void);
55 extern struct process *get_process_from_id( void *id );
56 extern struct process *get_process_from_handle( int handle, unsigned int access );
57 extern int process_set_debugger( struct process *process, struct thread *thread );
58 extern void add_process_thread( struct process *process,
59 struct thread *thread );
60 extern void remove_process_thread( struct process *process,
61 struct thread *thread );
62 extern void suspend_process( struct process *process );
63 extern void resume_process( struct process *process );
64 extern void kill_process( struct process *process, int exit_code );
65 extern int alloc_console( struct process *process );
66 extern int free_console( struct process *process );
67 extern struct object *get_console( struct process *process, int output );
68 extern struct process_snapshot *process_snap( int *count );
70 #endif /* __WINE_SERVER_PROCESS_H */