kernel.resource: Add missing $(PRIV_EXEC_INCLUDES), and the reason why.
[AROS.git] / rom / task / NextTaskEntry.c
blob4557c6cc4f501e408c4c02ee90fc541753430b2b
1 /*
2 Copyright © 2015, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #define DEBUG 0
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 /*****************************************************************************
20 NAME */
21 #include <proto/task.h>
23 AROS_LH2(struct Task *, NextTaskEntry,
25 /* SYNOPSIS */
26 AROS_LHA(struct TaskList *, tlist, D1),
27 AROS_LHA(ULONG , flags, D2),
29 /* LOCATION */
30 struct TaskResBase *, TaskResBase, 3, Task)
32 /* FUNCTION
33 Looks for the next task list entry with the right type. The list
34 must be locked for this.
36 INPUTS
37 tlist - the value given by LockTaskList()
38 flags - the same flags as given to LockTaskList() or a subset
39 of them.
41 RESULT
42 Pointer to task entry found or NULL if the are no more entries.
44 NOTES
46 EXAMPLE
48 BUGS
50 SEE ALSO
51 LockTaskList(), UnLockTaskList().
53 INTERNALS
55 *****************************************************************************/
57 AROS_LIBFUNC_INIT
59 struct TaskListPrivate *taskList = (struct TaskListPrivate *)tlist;
60 struct Task *retVal = NULL;
62 D(bug("[TaskRes] 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 = (struct TaskListEntry *)GetSucc(taskList->tlp_Next);
70 return retVal;
72 AROS_LIBFUNC_EXIT
73 } /* NextTaskEntry */