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_LH2(struct Task
*, NextTaskEntry
,
26 AROS_LHA(struct TaskList
*, tlist
, D1
),
27 AROS_LHA(ULONG
, flags
, D2
),
30 struct TaskResBase
*, TaskResBase
, 3, Task
)
33 Looks for the next task list entry with the right type. The list
34 must be locked for this.
37 tlist - the value given by LockTaskList()
38 flags - the same flags as given to LockTaskList() or a subset
42 Pointer to task entry found or NULL if the are no more entries.
51 LockTaskList(), UnLockTaskList().
55 *****************************************************************************/
59 struct TaskListPrivate
*taskList
= (struct TaskListPrivate
*)tlist
;
60 struct Task
*retVal
= NULL
;
62 D(bug("NextTaskEntry: tlist @ 0x%p, flags = $%lx\n", tlist
, flags
));
64 if (taskList
&& taskList
->tlp_Next
)
66 retVal
= taskList
->tlp_Next
->tle_Task
;
67 taskList
->tlp_Next
= GetSucc(taskList
->tlp_Next
);