scheduler: Update scheduler_set_operation_mode()
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user