Delay initialization of I/O permissions until they are first used.
[wine.git] / server / process.h
blob204fd04f44f553b5a591da2614614b90999c637e
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 struct msg_queue;
17 struct atom_table;
19 /* process structures */
21 struct process_dll
23 struct process_dll *next; /* per-process dll list */
24 struct process_dll *prev;
25 struct file *file; /* dll file */
26 void *base; /* dll base address (in process addr space) */
27 void *name; /* ptr to ptr to name (in process addr space) */
28 int dbg_offset; /* debug info offset */
29 int dbg_size; /* debug info size */
32 struct process
34 struct object obj; /* object header */
35 struct process *next; /* system-wide process list */
36 struct process *prev;
37 struct thread *thread_list; /* head of the thread list */
38 struct thread *debugger; /* thread debugging this process */
39 struct object *handles; /* handle entries */
40 int exit_code; /* process exit code */
41 int running_threads; /* number of threads running in this process */
42 struct timeval start_time; /* absolute time at process start */
43 struct timeval end_time; /* absolute time at process end */
44 int priority; /* priority class */
45 int affinity; /* process affinity mask */
46 int suspend; /* global process suspend count */
47 int create_flags; /* process creation flags */
48 struct object *console_in; /* console input */
49 struct object *console_out; /* console output */
50 struct event *init_event; /* event for init done */
51 struct event *idle_event; /* event for input idle */
52 struct msg_queue *queue; /* main message queue */
53 struct atom_table *atom_table; /* pointer to local atom table */
54 struct process_dll exe; /* main exe file */
55 void *ldt_copy; /* pointer to LDT copy in client addr space */
56 void *ldt_flags; /* pointer to LDT flags in client addr space */
59 struct process_snapshot
61 struct process *process; /* process ptr */
62 struct process *parent; /* process parent */
63 int count; /* process refcount */
64 int threads; /* number of threads */
65 int priority; /* priority class */
68 struct module_snapshot
70 void *base; /* module base addr */
73 /* process functions */
75 extern struct thread *create_process( int fd );
76 extern struct process *get_process_from_id( void *id );
77 extern struct process *get_process_from_handle( int handle, unsigned int access );
78 extern int process_set_debugger( struct process *process, struct thread *thread );
79 extern void add_process_thread( struct process *process,
80 struct thread *thread );
81 extern void remove_process_thread( struct process *process,
82 struct thread *thread );
83 extern void suspend_process( struct process *process );
84 extern void resume_process( struct process *process );
85 extern void kill_debugged_processes( struct thread *debugger, int exit_code );
86 extern struct process_snapshot *process_snap( int *count );
87 extern struct module_snapshot *module_snap( struct process *process, int *count );
89 static inline void *get_process_id( struct process *process ) { return process; }
91 #endif /* __WINE_SERVER_PROCESS_H */