1 #ifndef ___AROSC_PRIVDATA_H
2 #define ___AROSC_PRIVDATA_H
4 #include <exec/semaphores.h>
5 #include <devices/timer.h>
6 #include <proto/timer.h>
10 #include <sys/arosc.h>
19 /* All stuff visible by the user */
20 struct arosc_userdata acpd_acud
;
22 /* arosc_userdata can grow as much as it wishes,
23 as long as all new fields are added at the end of it.
25 arosc_privdata can also grow at please, but it has no restrictions
26 on the way things are modified in it, as long as arosc_userdata
27 is always kept at its beginning. */
29 /* Keep in here the pointer to the already existing arosc_privdata
32 This is a structure which gets allocated on a per-process basis,
33 however CLI programs are invoked as sort of subroutines of the CLI
34 process, although they must behave as if they were the only ones
35 having possession of their Process structure. Hence, this field
36 is used to save/restore the data of the previous CLI process. */
37 struct arosc_privdata
*acpd_oldprivdata
;
40 APTR acpd_startup_mempool
;
41 struct SignalSemaphore acpd_startup_memsem
;
44 struct __env_item
*acpd_env_list
;
47 struct MinList acpd_stdio_files
;
48 void *acpd_stdfiles
[3];
51 struct DateStamp acpd_startup_datestamp
;
55 struct _fdesc
**acpd_fd_array
;
58 struct MinList acpd_atexit_list
;
64 int acpd_startup_cd_changed
;
65 BPTR acpd_startup_cd_lock
;
68 struct timerequest acpd_timereq
;
69 struct MsgPort acpd_timeport
;
70 struct Device
*acpd_TimerBase
;
73 APTR acpd_process_returnaddr
;
77 char *acpd_apathbuf
; /* Buffer that holds the AROS path converted from the
78 equivalent *nix path. */
79 int acpd_doupath
; /* BOOL - does the conversion need to be done? */
82 char *acpd_joined_args
;
86 char acpd_fault_buf
[100];
89 int acpd_parent_does_upath
;
92 #define __get_arosc_privdata() ((struct arosc_privdata *)__get_arosc_userdata())
94 #define __oldprivdata (__get_arosc_privdata()->acpd_oldprivdata)
95 #define __env_list (__get_arosc_privdata()->acpd_env_list)
96 #define __stdio_files (__get_arosc_privdata()->acpd_stdio_files)
97 #define __numslots (__get_arosc_privdata()->acpd_numslots)
98 #define __fd_array (__get_arosc_privdata()->acpd_fd_array)
99 #define __startup_memsem (__get_arosc_privdata()->acpd_startup_memsem)
100 #define __startup_mempool (__get_arosc_privdata()->acpd_startup_mempool)
101 #define __startup_datestamp (__get_arosc_privdata()->acpd_startup_datestamp)
102 #define __stdfiles (__get_arosc_privdata()->acpd_stdfiles)
103 #define __atexit_list (__get_arosc_privdata()->acpd_atexit_list)
104 #define __umask (__get_arosc_privdata()->acpd_umask)
105 #define __startup_cd_changed (__get_arosc_privdata()->acpd_startup_cd_changed)
106 #define __startup_cd_lock (__get_arosc_privdata()->acpd_startup_cd_lock)
107 #define __timereq (__get_arosc_privdata()->acpd_timereq)
108 #define __timeport (__get_arosc_privdata()->acpd_timeport)
109 #define TimerBase (__get_arosc_privdata()->acpd_TimerBase)
110 #define __apathbuf (__get_arosc_privdata()->acpd_apathbuf)
111 #define __doupath (__get_arosc_privdata()->acpd_doupath)
113 #define __aros_startup ((struct aros_startup *)GetIntETask(FindTask(NULL))->iet_startup)
114 #define __aros_startup_jmp_buf (__aros_startup->as_startup_jmp_buf)
115 #define __aros_startup_error (__aros_startup->as_startup_error)
117 #endif /* !___AROSC_PRIVDATA_H */