Browse Source

core: adapted to renamed THREAD_FLAGS

cc430
Hauke Petersen 7 years ago
parent
commit
22428f6cfb
  1. 4
      core/kernel_init.c
  2. 6
      core/thread.c

4
core/kernel_init.c

@ -94,12 +94,12 @@ void kernel_init(void)
thread_create(idle_stack, sizeof(idle_stack),
THREAD_PRIORITY_IDLE,
CREATE_WOUT_YIELD | CREATE_STACKTEST,
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
idle_thread, NULL, idle_name);
thread_create(main_stack, sizeof(main_stack),
THREAD_PRIORITY_MAIN,
CREATE_WOUT_YIELD | CREATE_STACKTEST,
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
main_trampoline, NULL, main_name);
cpu_switch_context_exit();

6
core/thread.c

@ -148,7 +148,7 @@ kernel_pid_t thread_create(char *stack, int stacksize, char priority, int flags,
tcb_t *cb = (tcb_t *) (stack + stacksize);
#if defined(DEVELHELP) || defined(SCHED_TEST_STACK)
if (flags & CREATE_STACKTEST) {
if (flags & THREAD_CREATE_STACKTEST) {
/* assign each int of the stack the value of it's address */
uintptr_t *stackmax = (uintptr_t *) (stack + stacksize);
uintptr_t *stackp = (uintptr_t *) stack;
@ -212,13 +212,13 @@ kernel_pid_t thread_create(char *stack, int stacksize, char priority, int flags,
DEBUG("Created thread %s. PID: %" PRIkernel_pid ". Priority: %u.\n", name, cb->pid, priority);
if (flags & CREATE_SLEEPING) {
if (flags & THREAD_CREATE_SLEEPING) {
sched_set_status(cb, STATUS_SLEEPING);
}
else {
sched_set_status(cb, STATUS_PENDING);
if (!(flags & CREATE_WOUT_YIELD)) {
if (!(flags & THREAD_CREATE_WOUT_YIELD)) {
restoreIRQ(state);
sched_switch(priority);
return pid;

Loading…
Cancel
Save