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
);
51 struct Process
*proc
= NULL
;
52 struct userdata taskdata
;
56 parent
= ((struct userdata
*)this->tc_UserData
)->parent
;
57 showuserdata(this, parent
);
59 taskdata
.parent
= this;
61 proc
= CreateNewProcTags(
62 NP_Entry
, secondchild
,
63 NP_Name
, "Ikari Shinji",
64 NP_UserData
, &taskdata
,
68 Wait(SIGBREAKF_CTRL_F
);
72 Signal(parent
, SIGBREAKF_CTRL_F
);
77 int main(int argc
, char ** argv
)
79 struct Process
*proc
= NULL
;
80 struct userdata taskdata
;
81 struct Task
*thisTask
= FindTask(0);
82 taskdata
.parent
= thisTask
;
84 proc
= CreateNewProcTags(
86 NP_Name
, "Ayanami Rei",
87 NP_UserData
, &taskdata
,
91 Wait(SIGBREAKF_CTRL_F
);