aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sys/core.c2
-rw-r--r--src/sys/schedule.c24
-rw-r--r--src/util/lock.c2
3 files changed, 1 insertions, 27 deletions
diff --git a/src/sys/core.c b/src/sys/core.c
index e94c86b..9099a82 100644
--- a/src/sys/core.c
+++ b/src/sys/core.c
@@ -20,7 +20,7 @@ void sysinit(void)
// Initialize System Globals
stimeh = *(unsigned long*)SYS_TIMER_CHI;
stimel = *(unsigned long*)SYS_TIMER_CLO;
- *(unsigned long*) SYS_TIMER_C0 = 3000000 + stimeh; // 11 second trigger
+ *(unsigned long*) SYS_TIMER_C0 = 2000000 + stimeh; // 2 second trigger
uart_init();
///...
diff --git a/src/sys/schedule.c b/src/sys/schedule.c
index c3c549f..42a95b0 100644
--- a/src/sys/schedule.c
+++ b/src/sys/schedule.c
@@ -103,10 +103,6 @@ void prepend_thread_to_queue(struct Thread* t, unsigned char type, unsigned char
return;
}
prepend_to_queue(entry, queue);
- //entry->next = queue->start.next;
- //queue->start.next = entry;
- //if (entry->next->entry_type == END_ENTRY)
- // queue->end.next = entry;
}
struct Entry* pop_thread_from_queue(unsigned char type, unsigned char priority)
@@ -123,28 +119,8 @@ struct Entry* pop_thread_from_queue(unsigned char type, unsigned char priority)
return entry;
}
return pop_from_queue(queue);
- //if (queue->start.next->entry_type == END_ENTRY)
- // return entry;
- //entry = queue->start.next;
- //queue->start.next = entry->next;
- //if (entry->next->entry_type == END_ENTRY)
- // queue->end.next = &queue->start;
- //return entry;
}
-//struct Entry* remove_next_from_queue(struct Entry* te)
-//{
-// struct Entry* prev = te;
-// struct Entry* remove = te->next;
-// struct Entry* next = remove->next;
-// if (remove->entry_type == END_ENTRY || remove->entry_type == START_ENTRY)
-// return 0;
-// prev->next = next;
-// if (next->entry_type == END_ENTRY)
-// next->next = prev;
-// return remove;
-//}
-
struct Entry* find_pid(unsigned long pid)
{
for (unsigned char p = 0; p < PRIORITIES; p++) {
diff --git a/src/util/lock.c b/src/util/lock.c
index 50091b0..c9fe654 100644
--- a/src/util/lock.c
+++ b/src/util/lock.c
@@ -3,8 +3,6 @@
#include <util/mutex.h>
#include <util/lock.h>
-// TODO: Improve locking for system
-// 1. Deadlock prevention by going through mutex list
void lock(struct Lock* l)
{
unsigned long mode = getmode() & 0x1F;