Removed unused file.
[wine/wine64.git] / server / process.h
blob28fbd2e875989cf16311a1100cc4c5744c94c69a
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 #include "object.h"
12 struct msg_queue;
13 struct atom_table;
15 /* process structures */
17 struct process_dll
19 struct process_dll *next; /* per-process dll list */
20 struct process_dll *prev;
21 struct file *file; /* dll file */
22 void *base; /* dll base address (in process addr space) */
23 void *name; /* ptr to ptr to name (in process addr space) */
24 int dbg_offset; /* debug info offset */
25 int dbg_size; /* debug info size */
28 struct process
30 struct object obj; /* object header */
31 struct process *next; /* system-wide process list */
32 struct process *prev;
33 struct thread *thread_list; /* head of the thread list */
34 struct thread *debugger; /* thread debugging this process */
35 struct object *handles; /* handle entries */
36 int exit_code; /* process exit code */
37 int running_threads; /* number of threads running in this process */
38 struct timeval start_time; /* absolute time at process start */
39 struct timeval end_time; /* absolute time at process end */
40 int priority; /* priority class */
41 int affinity; /* process affinity mask */
42 int suspend; /* global process suspend count */
43 int create_flags; /* process creation flags */
44 struct object *console_in; /* console input */
45 struct object *console_out; /* console output */
46 struct event *init_event; /* event for init done */
47 struct event *idle_event; /* event for input idle */
48 struct msg_queue *queue; /* main message queue */
49 struct atom_table *atom_table; /* pointer to local atom table */
50 struct process_dll exe; /* main exe file */
51 void *ldt_copy; /* pointer to LDT copy in client addr space */
52 void *ldt_flags; /* pointer to LDT flags in client addr space */
55 struct process_snapshot
57 struct process *process; /* process ptr */
58 struct process *parent; /* process parent */
59 int count; /* process refcount */
60 int threads; /* number of threads */
61 int priority; /* priority class */
64 struct module_snapshot
66 void *base; /* module base addr */
69 /* process functions */
71 extern struct thread *create_process( int fd );
72 extern struct process *get_process_from_id( void *id );
73 extern struct process *get_process_from_handle( handle_t handle, unsigned int access );
74 extern int process_set_debugger( struct process *process, struct thread *thread );
75 extern void add_process_thread( struct process *process,
76 struct thread *thread );
77 extern void remove_process_thread( struct process *process,
78 struct thread *thread );
79 extern void suspend_process( struct process *process );
80 extern void resume_process( struct process *process );
81 extern void kill_process( struct process *process, struct thread *skip, int exit_code );
82 extern void kill_debugged_processes( struct thread *debugger, int exit_code );
83 extern struct process_snapshot *process_snap( int *count );
84 extern struct module_snapshot *module_snap( struct process *process, int *count );
86 static inline void *get_process_id( struct process *process ) { return process; }
88 #endif /* __WINE_SERVER_PROCESS_H */