2 Copyright © 2015, The AROS Development Team. All rights reserved.
8 #include <aros/debug.h>
9 #include <exec/types.h>
10 #include <aros/libcall.h>
11 #include <proto/utility.h>
12 #include <resources/task.h>
14 #include <resources/task.h>
16 #include "taskres_intern.h"
18 /*****************************************************************************
21 #include <proto/task.h>
23 AROS_LH1(struct TaskList
*, LockTaskList
,
26 AROS_LHA(ULONG
, flags
, D1
),
29 struct TaskResBase
*, TaskResBase
, 1, Task
)
37 Handle to the task list. This is not a direct pointer
38 to the first list element but to a pseudo element instead.
47 UnLockTaskList(), NextTaskEntry().
51 *****************************************************************************/
55 struct TaskListPrivate
*taskList
= NULL
;
57 D(bug("[TaskRes] LockTaskList: flags = $%lx\n", flags
));
59 if ((taskList
= AllocMem(sizeof(struct TaskListPrivate
), MEMF_CLEAR
)) != NULL
)
61 taskList
->tlp_Tasks
= &TaskResBase
->trb_TaskList
;
62 taskList
->tlp_Next
= (struct TaskListEntry
*)GetHead(taskList
->tlp_Tasks
);
63 AddTail(&TaskResBase
->trb_LockedLists
, &taskList
->tlp_Node
);
66 return (struct TaskList
*)taskList
;