scheduler: Update scheduler_set_operation_mode()

This commit is contained in:
Pawel Dziepak
2013-10-24 03:24:53 +02:00
parent 978fc08065
commit 9d7e2acf34
+8 -8
View File
@@ -1402,18 +1402,18 @@ scheduler_start(void)
} }
static status_t status_t
set_operation_mode(scheduler_mode mode) scheduler_set_operation_mode(scheduler_mode mode)
{ {
if (mode != SCHEDULER_MODE_PERFORMANCE if (mode != SCHEDULER_MODE_PERFORMANCE
&& mode != SCHEDULER_MODE_POWER_SAVING) { && mode != SCHEDULER_MODE_POWER_SAVING) {
return B_BAD_VALUE; return B_BAD_VALUE;
} }
#ifdef TRACE_SCHEDULER const char* modeNames[] = { "performance", "power saving" };
const char* modeNames = { "performance", "power saving" }; dprintf("scheduler: switching to %s mode\n", modeNames[mode]);
#endif
TRACE("switching scheduler to %s mode\n", modeNames[mode]); InterruptsSpinLocker _(gSchedulerLock);
sSchedulerMode = mode; sSchedulerMode = mode;
switch (mode) { switch (mode) {
@@ -1627,9 +1627,9 @@ _scheduler_init()
} }
#if 1 #if 1
set_operation_mode(SCHEDULER_MODE_POWER_SAVING); scheduler_set_operation_mode(SCHEDULER_MODE_PERFORMANCE);
#else #else
set_operation_mode(SCHEDULER_MODE_PERFORMANCE); scheduler_set_operation_mode(SCHEDULER_MODE_POWER_SAVING);
#endif #endif
add_debugger_command_etc("run_queue", &dump_run_queue, add_debugger_command_etc("run_queue", &dump_run_queue,