arch/m68k-amiga: Define the gcc symbol 'start' instead of using .bss
[AROS.git] / compiler / clib / __arosc_privdata.h
blob41d230014bb9164c6f3c4f3f00858f0b3bc1d644
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 "etask.h"
15 #include "__vfork.h"
17 struct _fdesc;
18 struct __env_item;
20 struct aroscbase
22 struct Library acb_library;
24 struct arosc_userdata acb_acud;
26 /* arosc_userdata can grow as much as it wishes,
27 as long as all new fields are added at the end of it.
29 arosc_privdata can also grow at please, but it has no restrictions
30 on the way things are modified in it, as long as arosc_userdata
31 is always kept at its beginning. */
33 /* malloc.c */
34 APTR acb_mempool;
36 /* __env.c */
37 struct __env_item *acb_env_list;
39 /* __stdio.c */
40 struct MinList acb_stdio_files;
42 /* clock.c */
43 struct DateStamp acb_datestamp;
45 /* __open.c */
46 APTR acb_fd_mempool;
47 int acb_numslots;
48 struct _fdesc **acb_fd_array;
50 /* atexit.c */
51 struct MinList acb_atexit_list;
53 /* umask.c */
54 mode_t acb_umask;
56 /* Used by chdir() */
57 int acb_cd_changed;
58 BPTR acb_cd_lock;
60 /* gettimeofday */
61 struct timerequest acb_timereq;
62 struct MsgPort acb_timeport;
63 LONG acb_gmtoffset;
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;
76 int acb_flags;
78 /* strerror */
79 char acb_fault_buf[100];
81 /* __arosc_nixmain */
82 int acb_parent_does_upath;
84 /* flock.c */
85 struct MinList acb_file_locks;
87 /* __vfork.c */
88 struct vfork_data *acb_vfork_data;
90 /* __exec.c */
91 BPTR acb_exec_seglist;
92 char *acb_exec_args;
93 char *acb_exec_taskname;
94 APTR acb_exec_pool;
95 char **acb_exec_tmparray;
96 BPTR acb_exec_oldin, acb_exec_oldout, acb_exec_olderr;
97 struct Library *acb_exec_aroscbase;
100 /* acb_flags */
102 /* When a program is started with the exec functions and from vfork,
103 this is indicated in the flags of the library.
104 This way the child can use the parent arosc library during its initialization
105 phase */
106 #define EXEC_PARENT 1
107 #define VFORK_PARENT 2
109 /* This flag is set by vfork() to correctly report child process ID during
110 execution of child code, even though that it's actually executed by parent
111 process until execve() is called. */
112 #define PRETEND_CHILD 4
114 /* By default arosc.library creates new arosc_privdata when opened if
115 pr_ReturnAddr has changed (for example during RunCommand()). Setting
116 this flag prevents creation of new arosc_privdata. */
117 #define KEEP_OLD_ACPD 8
119 /* By default a new process will get new ACPD when it(or any other library
120 it uses) opens arosc.library. This flag prohibits that and forces the
121 child process to share ACPD with parent process */
122 /* FIXME: SHARE_ACPD_WITH_CHILD not implemented, is it still needed ?
123 aroscbase can now be used from different tasks without the need
124 for SHARE_ACPD_WITH_CHILD
126 #define SHARE_ACPD_WITH_CHILD 16
128 /* !acb_flags */
130 struct aroscbase *__GM_GetBase();
131 #define __get_aroscbase() __GM_GetBase()
133 #define __env_list (__get_aroscbase()->acb_env_list)
134 #define __stdio_files (__get_aroscbase()->acb_stdio_files)
135 #define __numslots (__get_aroscbase()->acb_numslots)
136 #define __fd_mempool (__get_aroscbase()->acb_fd_mempool)
137 #define __fd_array (__get_aroscbase()->acb_fd_array)
138 #define __mempool (__get_aroscbase()->acb_mempool)
139 #define __datestamp (__get_aroscbase()->acb_datestamp)
140 #define __atexit_list (__get_aroscbase()->acb_atexit_list)
141 #define __umask (__get_aroscbase()->acb_umask)
142 #define __cd_changed (__get_aroscbase()->acb_cd_changed)
143 #define __cd_lock (__get_aroscbase()->acb_cd_lock)
144 #define __timereq (__get_aroscbase()->acb_timereq)
145 #define __timeport (__get_aroscbase()->acb_timeport)
146 #define __gmtoffset (__get_aroscbase()->acb_gmtoffset)
147 #define __apathbuf (__get_aroscbase()->acb_apathbuf)
148 #define __doupath (__get_aroscbase()->acb_doupath)
149 #define __flocks_list (__get_aroscbase()->acb_file_locks)
151 #endif /* !___AROSC_PRIVDATA_H */