- Made pciuhci.device and pciehci.device compile again: completed
[AROS.git] / compiler / clib / __arosc_privdata.h
blob88bd10369556485e1fdaa8b095a42e0b78d8ccdf
1 #ifndef ___AROSC_PRIVDATA_H
2 #define ___AROSC_PRIVDATA_H
4 #include <exec/semaphores.h>
5 #include <exec/libraries.h>
6 #include <devices/timer.h>
7 #include <proto/timer.h>
8 #include <dos/dos.h>
9 #include <aros/cpu.h>
11 #include <sys/types.h>
12 #include <sys/arosc.h>
14 #include <aros/types/clock_t.h>
15 /* Some structs that are defined privately */
16 struct _fdesc;
17 struct __env_item;
18 struct vfork_data;
19 struct signal_func_data;
20 struct random_state;
22 struct aroscbase
24 struct Library acb_library;
26 struct arosc_userdata acb_acud;
28 /* arosc_userdata can grow as much as it wishes,
29 as long as all new fields are added at the end of it.
31 arosc_privdata can also grow at please, but it has no restrictions
32 on the way things are modified in it, as long as arosc_userdata
33 is always kept at its beginning. */
35 /* common */
36 int acb_flags;
37 APTR acb_internalpool;
39 /* malloc.c */
40 APTR acb_mempool;
42 /* __env.c */
43 struct __env_item *acb_env_list;
45 /* __stdio.c */
46 struct MinList acb_stdio_files;
48 /* clock.c */
49 clock_t acb_starttime;
51 /* __open.c */
52 int acb_numslots;
53 struct _fdesc **acb_fd_array;
55 /* atexit.c */
56 struct MinList acb_atexit_list;
58 /* umask.c */
59 mode_t acb_umask;
61 /* Used by chdir() */
62 int acb_cd_changed;
63 BPTR acb_cd_lock;
65 /* __arosc_usedata */
66 APTR acb_process_returnaddr;
67 ULONG acb_usercount;
69 /* __upath */
70 char *acb_apathbuf; /* Buffer that holds the AROS path converted from the
71 equivalent *nix path. */
72 int acb_doupath; /* BOOL - does the conversion need to be done? */
74 /* spawn* */
75 char *acb_joined_args;
77 /* strerror */
78 char acb_fault_buf[100];
80 /* __arosc_nixmain */
81 int acb_parent_does_upath;
83 /* flock.c */
84 struct List *acb_file_locks;
86 /* __vfork.c */
87 struct vfork_data *acb_vfork_data;
89 /* __exec.c */
90 BPTR acb_exec_seglist;
91 char *acb_exec_args;
92 char *acb_exec_taskname;
93 APTR acb_exec_pool;
94 char **acb_exec_tmparray;
95 BPTR acb_exec_oldin, acb_exec_oldout, acb_exec_olderr;
96 struct Library *acb_exec_aroscbase;
98 /* environ emulation */
99 char ***acb_environptr;
101 /* signal.c & co. */
102 struct signal_func_data *acb_sigfunc_array;
104 /* rand */
105 unsigned int acb_srand_seed;
107 /* Used for random()/srandom() */
108 struct random_state *acb_random;
110 /* Used for arosc startup code */
111 int *acb_startup_error_ptr;
112 jmp_buf acb_exit_jmp_buf;
115 /* acb_flags */
117 /* When a program is started with the exec functions and from vfork,
118 this is indicated in the flags of the library.
119 This way the child can use the parent arosc library during its initialization
120 phase */
121 #define EXEC_PARENT 1
122 #define VFORK_PARENT 2
124 /* This flag is set by vfork() to correctly report child process ID during
125 execution of child code, even though that it's actually executed by parent
126 process until execve() is called. */
127 #define PRETEND_CHILD 4
129 /* By default arosc.library creates new arosc_privdata when opened if
130 pr_ReturnAddr has changed (for example during RunCommand()). Setting
131 this flag prevents creation of new arosc_privdata. */
132 #define KEEP_OLD_ACPD 8
134 /* By default a new process will get new ACPD when it(or any other library
135 it uses) opens arosc.library. This flag prohibits that and forces the
136 child process to share ACPD with parent process */
137 /* FIXME: SHARE_ACPD_WITH_CHILD not implemented, is it still needed ?
138 aroscbase can now be used from different tasks without the need
139 for SHARE_ACPD_WITH_CHILD
141 #define SHARE_ACPD_WITH_CHILD 16
143 /* Make a distinction between exit() and abort() */
144 #define ABNORMAL_EXIT 32
146 /* !acb_flags */
148 /* This function is added by genmodule and returns the current arosc
149 libbase.
151 struct aroscbase *__aros_getbase_aroscbase(void);
153 #endif /* !___AROSC_PRIVDATA_H */