2 #include <proto/exec.h>
8 #include "../rom/exec/etask.h"
15 void showuserdata(struct Task
*this, struct Task
*parent
)
17 struct arosc_privdata
*acpd
= NULL
;
18 acpd
= GetIntETask(this)->iet_acpd
;
19 printf("Task %p acpd: %p\n", this, acpd
);
23 printf("acpd is NULL, trying it in parent\n");
26 acpd
= GetIntETask(parent
)->iet_acpd
;
27 printf("Parent %p acpd: %p\n", parent
, acpd
);
37 printf("Grandchild\n");
39 parent
= ((struct userdata
*)this->tc_UserData
)->parent
;
40 showuserdata(this, parent
);
42 Signal(parent
, SIGBREAKF_CTRL_F
);
49 struct Process
*proc
= NULL
;
50 struct userdata taskdata
;
54 parent
= ((struct userdata
*)this->tc_UserData
)->parent
;
55 showuserdata(this, parent
);
57 taskdata
.parent
= this;
59 proc
= CreateNewProcTags(
60 NP_Entry
, secondchild
,
61 NP_Name
, "Ikari Shinji",
62 NP_UserData
, &taskdata
,
66 Wait(SIGBREAKF_CTRL_F
);
70 Signal(parent
, SIGBREAKF_CTRL_F
);
73 int main(int argc
, char ** argv
)
75 struct Process
*proc
= NULL
;
76 struct userdata taskdata
;
77 struct Task
*thisTask
= FindTask(0);
78 taskdata
.parent
= thisTask
;
80 proc
= CreateNewProcTags(
82 NP_Name
, "Ayanami Rei",
83 NP_UserData
, &taskdata
,
87 Wait(SIGBREAKF_CTRL_F
);