Makefile adopted to changed font names.
[cake.git] / compiler / clib / __arosc_privdata.h
blob4604352531e59ca8be0247c411f0bc5aada7d01f
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>
7 #include <dos/dos.h>
9 #include <sys/types.h>
10 #include <sys/arosc.h>
12 #include "etask.h"
14 struct _fdesc;
15 struct __env_item;
17 struct arosc_privdata
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
30 structure.
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;
39 /* malloc.c */
40 APTR acpd_startup_mempool;
41 struct SignalSemaphore acpd_startup_memsem;
43 /* __env.c */
44 struct __env_item *acpd_env_list;
46 /* __stdio.c */
47 struct MinList acpd_stdio_files;
48 void *acpd_stdfiles[3];
50 /* clock.c */
51 struct DateStamp acpd_startup_datestamp;
53 /* __open.c */
54 int acpd_numslots;
55 struct _fdesc **acpd_fd_array;
57 /* atexit.c */
58 struct MinList acpd_atexit_list;
60 /* umask.c */
61 mode_t acpd_umask;
63 /* Used by chdir() */
64 int acpd_startup_cd_changed;
65 BPTR acpd_startup_cd_lock;
67 /* gettimeofday */
68 struct timerequest acpd_timereq;
69 struct MsgPort acpd_timeport;
70 struct Device *acpd_TimerBase;
72 /* __arosc_usedata */
73 APTR acpd_process_returnaddr;
74 ULONG acpd_usercount;
76 /* __upath */
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? */
81 /* spawn* */
82 char *acpd_joined_args;
83 int acpd_spawned;
85 /* strerror */
86 char acpd_fault_buf[100];
88 /* __arosc_nixmain */
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 */