core/sched: clean up

- remove stray 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`
dev/timer
Ludwig Ortmann 9 years ago
parent 61f405edaa
commit 9cabdb3043

@ -17,8 +17,6 @@
* @author Kaspar Schleiser <kaspar@schleiser.de>
*
* @}
*
* TODO: setup dependency from SCHEDSTATISTICS to MODULE_HWTIMER
*/
#include <stdint.h>
@ -114,13 +112,13 @@ void sched_run(void)
DEBUG("scheduler: next task: %s\n", my_active_thread->name);
if (my_active_thread != sched_active_thread) {
if (sched_active_thread != NULL) { /* TODO: necessary? */
if (sched_active_thread->status == STATUS_RUNNING) {
sched_active_thread->status = STATUS_PENDING ;
if (sched_active_thread != NULL) {
if (sched_active_thread->status == STATUS_RUNNING) {
sched_active_thread->status = STATUS_PENDING;
}
}
sched_set_status((tcb_t *)my_active_thread, STATUS_RUNNING);
sched_set_status((tcb_t *)my_active_thread, STATUS_RUNNING);
}
sched_active_thread = (volatile tcb_t *) my_active_thread;

Loading…
Cancel
Save