2 Copyright © 2014, The AROS Development Team. All rights reserved.
6 #include <aros/debug.h>
8 #include "taskstorage.h"
10 /*****************************************************************************
13 #include <proto/exec.h>
15 AROS_LH1(IPTR
, GetParentTaskStorageSlot
,
18 AROS_LHA(LONG
, id
, D0
),
19 struct ExecBase
*, SysBase
, 186, Exec
)
22 Get a value for a task storage slot of parent task.
25 id - slot ID returned from AllocTaskStorageSlot().
28 Value stored by SetTaskStorageSlot() on parent task, or
29 (IPTR)NULL if the slot was never used.
32 Since you are accessing value of another task, the value
33 might be invalid/freed by the time this function returns.
34 To be sure value is still valid, call this function under
42 AllocTaskStorageSlot(), FreeTaskStorageSlot(), SetTaskStorageSlot(),
47 ******************************************************************************/
51 struct ETask
*et
= GetETask(FindTask(NULL
));
52 IPTR result
= (IPTR
)NULL
;
57 Forbid(); /* Accessing other task's et_TaskStorage */
59 result
= TaskGetStorageSlot(et
->et_Parent
, id
);