aboutsummaryrefslogtreecommitdiffstats
path: root/src/task.c
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2018-02-22 11:14:33 -0500
committerClyne Sullivan <tullivan99@gmail.com>2018-02-22 11:14:33 -0500
commit9f61013faf98f8909e0853954218ec10c3b3c6fb (patch)
tree65def179de443aabc7d38109ef867cbb9d5ebaee /src/task.c
parenteee1be766d35a3ab76b10fc0aeaf1bbe7a88bfbc (diff)
things should work now
Diffstat (limited to 'src/task.c')
-rw-r--r--src/task.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/task.c b/src/task.c
index 13e4e75..d0cb3f1 100644
--- a/src/task.c
+++ b/src/task.c
@@ -54,7 +54,6 @@ void task_init(void (*init)(void))
task_disable = 0;
init();
- // you dirty dirty dog
/*asm("\
cpsie i; \
mov pc, %0; \
@@ -65,9 +64,8 @@ void task_start(void (*task)(void), uint16_t stackSize)
{
task_hold(1);
task_t *t = task_create(task, stackSize);
- task_t *next = (task_t *)current->next;
+ t->next = current->next;
current->next = t;
- t->next = next;
task_hold(0);
}
@@ -96,12 +94,8 @@ void PendSV_Handler(void)
msr psp, r0; \
isb; \
dsb; \
- " :: "r" (current->sp));
-
- // end
- asm("\
cpsie i; \
bx lr; \
- ");
+ " :: "r" (current->sp));
}