mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
* merge fixes
This commit is contained in:
parent
1e238e4131
commit
11bc939d67
@ -76,7 +76,7 @@ void kernel_init(void)
|
||||
|
||||
sched_init();
|
||||
|
||||
if (thread_create(&main_tcb, main_stack, sizeof(main_stack), PRIORITY_IDLE, CREATE_WOUT_YIELD | CREATE_STACKTEST, idle_stack, idle_name) < 0) {
|
||||
if (thread_create(&main_tcb, main_stack, sizeof(main_stack), PRIORITY_IDLE, CREATE_WOUT_YIELD | CREATE_STACKTEST, idle_thread, idle_name) < 0) {
|
||||
printf("kernel_init(): error creating idle task.\n");
|
||||
}
|
||||
|
||||
|
@ -149,14 +149,12 @@ extern void cpu_switch_context_exit(void);
|
||||
void sched_task_exit(void) {
|
||||
DEBUG("sched_task_exit(): ending task %s...\n", active_thread->name);
|
||||
|
||||
tcb* thread = (tcb*)active_thread;
|
||||
dINT();
|
||||
sched_threads[active_thread->pid] = NULL;
|
||||
num_tasks--;
|
||||
|
||||
sched_set_status((tcb*)active_thread, STATUS_STOPPED);
|
||||
|
||||
free(((tcb*)active_thread)->stack_start);
|
||||
active_thread = NULL;
|
||||
cpu_switch_context_exit();
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ int thread_create(tcb *cb, char *stack, int stacksize, char priority, int flags,
|
||||
while (pid < MAXTHREADS) {
|
||||
if (sched_threads[pid] == NULL) {
|
||||
sched_threads[pid] = cb;
|
||||
pd->pid = pid;
|
||||
cb->pid = pid;
|
||||
break;
|
||||
}
|
||||
pid++;
|
||||
|
Loading…
Reference in New Issue
Block a user