Small cleanup of extensions code
[AROS.git] / compiler / clib / __vfork.h
blob44f5b36424f13f6faadc881e12ba246f3b3e37d6
1 #ifndef __VFORK_H
2 #define __VFORK_H
4 /*
5 Copyright © 2008-2009, The AROS Development Team. All rights reserved.
6 $Id$
7 */
9 #include <exec/types.h>
10 #include <dos/bptr.h>
11 #include <exec/exec.h>
12 #include <setjmp.h>
13 #include <aros/startup.h>
15 /* Define index of a stack register value in jmp_buf.regs */
17 #if defined __i386__
18 # define STACK_INDEX (_JMPLEN-1)
19 #elif defined __x86_64__
20 # define STACK_INDEX (_JMPLEN-1)
21 #elif defined __powerpc__
22 # define STACK_INDEX 1
23 #else
24 # error unsupported CPU type
25 #endif
27 #define VFORK_MAGIC 0x666
29 #define GETUDATA ((struct vfork_data*) __get_arosc_privdata()->acpd_vfork_data)
31 struct vfork_data
33 struct vfork_data *prev;
34 jmp_buf vfork_jump;
36 struct Task *parent;
37 jmp_buf startup_jmp_buf;
39 APTR old_UserData;
40 ULONG child_id;
41 BYTE parent_signal;
42 APTR parent_acpd_fd_mempool;
43 void *parent_acpd_fd_array;
44 int parent_acpd_numslots;
45 BPTR parent_curdir;
46 struct arosc_privdata *ppriv;
47 int old_acpd_flags;
49 struct Task *child;
50 struct aros_startup child_startup;
51 struct arosc_privdata *cpriv;
52 struct Library *aroscbase;
53 int child_executed;
54 int child_errno;
55 BYTE child_signal;
57 ULONG exec_stacksize;
58 BPTR exec_seglist;
59 char *exec_arguments;
60 char *exec_taskname;
61 LONG exec_returncode;
64 #endif /* __VFORK_H */