Skip to content
Snippets Groups Projects
Commit 3dce0cbb authored by Christian Mehlis's avatar Christian Mehlis
Browse files

Merge pull request #662 from Kijewski/remove-sched_init

Do not zero out sched_threads needlessly
parents 7092ac62 7e685d6b
No related branches found
No related tags found
No related merge requests found
...@@ -34,11 +34,6 @@ ...@@ -34,11 +34,6 @@
#define SCHED_PRIO_LEVELS 16 #define SCHED_PRIO_LEVELS 16
#endif #endif
/**
* @brief Initializes thread table, active thread information, and runqueues
*/
void sched_init(void);
/** /**
* @brief Triggers the scheduler to schedule the next task * @brief Triggers the scheduler to schedule the next task
*/ */
......
...@@ -70,8 +70,6 @@ void kernel_init(void) ...@@ -70,8 +70,6 @@ void kernel_init(void)
dINT(); dINT();
printf("kernel_init(): This is RIOT! (Version: %s)\n", VERSION); printf("kernel_init(): This is RIOT! (Version: %s)\n", VERSION);
sched_init();
if (thread_create(idle_stack, sizeof(idle_stack), PRIORITY_IDLE, CREATE_WOUT_YIELD | CREATE_STACKTEST, idle_thread, idle_name) < 0) { if (thread_create(idle_stack, sizeof(idle_stack), PRIORITY_IDLE, CREATE_WOUT_YIELD | CREATE_STACKTEST, idle_thread, idle_name) < 0) {
printf("kernel_init(): error creating idle task.\n"); printf("kernel_init(): error creating idle task.\n");
} }
......
...@@ -43,7 +43,7 @@ volatile unsigned int sched_context_switch_request; ...@@ -43,7 +43,7 @@ volatile unsigned int sched_context_switch_request;
volatile tcb_t *sched_threads[MAXTHREADS]; volatile tcb_t *sched_threads[MAXTHREADS];
volatile tcb_t *active_thread; volatile tcb_t *active_thread;
volatile int thread_pid; volatile int thread_pid = -1;
volatile int last_pid = -1; volatile int last_pid = -1;
clist_node_t *runqueues[SCHED_PRIO_LEVELS]; clist_node_t *runqueues[SCHED_PRIO_LEVELS];
...@@ -54,30 +54,6 @@ static void (*sched_cb) (uint32_t timestamp, uint32_t value) = NULL; ...@@ -54,30 +54,6 @@ static void (*sched_cb) (uint32_t timestamp, uint32_t value) = NULL;
schedstat pidlist[MAXTHREADS]; schedstat pidlist[MAXTHREADS];
#endif #endif
void sched_init()
{
printf("Scheduler...");
int i;
for (i = 0; i < MAXTHREADS; i++) {
sched_threads[i] = NULL;
#if SCHEDSTATISTICS
pidlist[i].laststart = 0;
pidlist[i].runtime_ticks = 0;
pidlist[i].schedules = 0;
#endif
}
active_thread = NULL;
thread_pid = -1;
for (i = 0; i < SCHED_PRIO_LEVELS; i++) {
runqueues[i] = NULL;
}
printf("[OK]\n");
}
void sched_run() void sched_run()
{ {
sched_context_switch_request = 0; sched_context_switch_request = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment