mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
core: adapted to renamed THREAD_FLAGS
This commit is contained in:
parent
7dcb40b46a
commit
22428f6cfb
@ -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();
|
||||
|
@ -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…
Reference in New Issue
Block a user