Autodoc corrections
[cake.git] / compiler / clib / __vfork.h
blob6051be334dee2199d621aa271d4084d4a12a3ad4
1 #ifndef __VFORK_H
2 #define __VFORK_H
4 /*
5 Copyright © 2008, 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*) ((struct Task*) FindTask(NULL))->tc_UserData)
31 struct vfork_data
33 int magic;
34 jmp_buf vfork_jump;
36 struct Task *parent;
37 APTR parent_SPLower;
38 APTR parent_SPUpper;
39 APTR parent_SPReg;
40 char ministack[4096] __attribute__ ((aligned));
42 APTR old_UserData;
43 ULONG child_id;
44 BYTE parent_signal;
46 struct Task *child;
47 APTR child_SPLower;
48 APTR child_SPUpper;
49 APTR child_SPReg;
50 APTR child_mempool;
51 struct aros_startup child_startup;
52 struct Library *aroscbase;
53 int child_executed;
54 int child_acpd_numslots;
55 void *child_acpd_fd_array;
56 int child_errno;
57 BYTE child_signal;
59 ULONG exec_stacksize;
60 BPTR exec_seglist;
61 char *exec_arguments;
62 char *exec_taskname;
63 LONG exec_returncode;
66 #endif /* __VFORK_H */