core: remove unnecessary tests in sched.c#1306
core: remove unnecessary tests in sched.c#1306LudwigKnuepfer merged 1 commit intoRIOT-OS:masterfrom Kijewski:issue-19
Conversation
The scheduling gets activated by `kernel_init()` calling `cpu_switch_context_exit()`. Before this `sched_run()` won't be called. When it gets called, at least the main thread and the idle thread are spawned. The idle thread won't die / get killed. So there always is at least one thread in `runqueue_bitcache`. Closes #19.
|
I disagree that this closes #19, but I agree that the issue is rather imprecise. For the change itself: it sounds sensible, but maybe we should put a |
|
btw. the goal was to have less PRs... ;) |
Hehe, sometimes you need to open a new PR to close an old one. (Damn, why didn't I study philosophy instead of CS. ;) ) |
|
Well, you could argue that computer science is part of mathematics which can be considered as part of philosophy. |
|
Wow. Where I'm from, philosophy is part of mathematics, not the other way around... |
I think #ifdef DEVELHELP
if (sched_active_thread->priority == SCHED_PRIO_LEVELS - 1) {
core_panic(4711, "Achievement unlocked: Killed the idle thread.");
}
#endif |
|
hehe, you're probably right - plus I like the error message. |
|
;) |
|
@Kijewski can you split this in a style fixup and the actual contribution? open two PRs... |
|
How about no? We don't need PRs for styling fixes. |
|
Agreed concerning styling PRs. |
|
ACK, second missing. |
|
ACK. Actually, styling changes should be seperated. They're supereasy to ACK and keep the clutter out of the real diffs. Isn't that even part of the commit guidelines? Just for future PRs... |
core: remove unnecessary tests in sched.c
some errors were introduced by RIOT-OS#1306, some existed before
some errors were introduced by RIOT-OS#1306, some existed before
some errors were introduced by RIOT-OS#1306, some existed before
some errors were introduced by RIOT-OS#1306, some existed before
some errors were introduced by RIOT-OS#1306, some existed before
- Fix (non-)use of thread_*_pid - some errors were introduced by RIOT-OS#1306, some existed before. - Refactor SCHEDSTATISTICS - Remove double spaces - Remove TODOs: - MODULE_HWTIMER is not a module anymore - checking for NULL is necessary, at least without API changes. `sched_task_exit` sets `sched_active_thread` to `NULL`, then exits. Afterwards `cpu_switch_context_exit` calls `sched_run`. - Eradicate MODULE_NSS specific code (*last_pid*)
The scheduling gets activated by
kernel_init()callingcpu_switch_context_exit(). Before thissched_run()won't be called.When it gets called, at least the main thread and the idle thread are
spawned. The idle thread won't die / get killed. So there always is at
least one thread in
runqueue_bitcache.Closes #19.