Skip to content

Commit

Permalink
core: adapted to renamed THREAD_FLAGS
Browse files Browse the repository at this point in the history
  • Loading branch information
haukepetersen committed Dec 7, 2015
1 parent 7dcb40b commit 22428f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions core/kernel_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
6 changes: 3 additions & 3 deletions core/thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 22428f6

Please sign in to comment.