adopt previous changes. (NicJA)
[AROS.git] / rom / task / task_intern.h
blob2acb733ffec3ab240c586aa6194bd256f002e14a
1 /*
2 Copyright © 2015-2017, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #ifndef TASKRES_INTERN_H
7 #define TASKRES_INTERN_H
9 #ifndef EXEC_TYPES_H
10 #include <exec/types.h>
11 #endif
12 #ifndef EXEC_NODES_H
13 #include <exec/nodes.h>
14 #endif
15 #ifndef EXEC_LISTS_H
16 #include <exec/lists.h>
17 #endif
18 #ifndef EXEC_SEMAPHORES_H
19 #include <exec/semaphores.h>
20 #endif
21 #ifndef UTILITY_UTILITY_H
22 #include <utility/utility.h>
23 #endif
25 #include <exec_intern.h>
27 #define TASKRES_ENABLE
29 #if defined(__AROSEXEC_SMP__)
30 #include <aros/types/spinlock_s.h>
31 #include <resources/execlock.h>
32 #ifndef TASKRES_ENABLE
33 #define TASKRES_ENABLE
34 #endif
35 #endif
37 struct TaskResBase
39 struct Library trb_LibNode;
40 APTR trb_KernelBase;
41 APTR trb_NewAddTask;
42 APTR trb_RemTask;
43 struct SignalSemaphore trb_Sem;
44 #if defined(__AROSEXEC_SMP__)
45 spinlock_t TaskListSpinLock;
46 void * trb_ExecLock;
47 #endif
48 struct List trb_TaskList;
49 struct List trb_NewTasks;
50 struct List trb_LockedLists;
51 struct Library * trb_UtilityBase;
54 struct TaskListEntry
56 struct Node tle_Node;
57 struct Task *tle_Task;
60 #ifdef TASKRES_ENABLE
61 struct TaskListPrivate
63 struct Node tlp_Node;
64 ULONG tlp_Flags;
65 struct List *tlp_Tasks;
66 struct TaskListEntry *tlp_Next;
68 #else
69 struct TaskListPrivate
71 struct List *tlp_TaskList;
72 struct Task *tlp_Current;
74 #endif /* TASKRES_ENABLE */
76 #ifdef KernelBase
77 #undef KernelBase
78 #endif
80 #define KernelBase TaskResBase->trb_KernelBase
82 void task_CleanList(struct Task * task, struct TaskResBase *TaskResBase);
84 #endif /* TASKRES_INTERN_H */