aboutsummaryrefslogtreecommitdiff
path: root/include/sys
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2022-03-16 12:46:30 -0700
committerChristian Cunningham <cc@localhost>2022-03-16 12:46:30 -0700
commitb7590870cfd909baca7b5dc1d954e233ec92092e (patch)
tree05f9747dc08d65c3910a5f2d7f1385eb0bb3ceb6 /include/sys
parent4cf9e1ac0f0f6133baf4e8136e600ea51aaab65d (diff)
List Schedule
Diffstat (limited to 'include/sys')
-rw-r--r--include/sys/schedule.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/include/sys/schedule.h b/include/sys/schedule.h
index 3015e98..a6e03a9 100644
--- a/include/sys/schedule.h
+++ b/include/sys/schedule.h
@@ -13,6 +13,12 @@ enum ThreadStatus {
THREAD_SWAIT = 2,
};
+enum EntryTypes {
+ THREAD_ENTRY = 0,
+ START_ENTRY = 1,
+ END_ENTRY = 2,
+};
+
struct Thread {
void* pc;
void* sp; // Store r0-r12,lr on stack
@@ -31,18 +37,13 @@ struct Thread {
struct ThreadEntry {
struct Thread* thread;
- struct ThreadEntry* prev;
struct ThreadEntry* next;
-};
-
-struct ThreadEntryIterator {
- struct ThreadEntry* entry;
+ unsigned long entry_type;
};
struct ThreadQueue {
- struct ThreadEntry entry[TQUEUE_MAX];
- struct ThreadEntryIterator read;
- struct ThreadEntryIterator write;
+ struct ThreadEntry start;
+ struct ThreadEntry end;
};
struct Scheduler {