* CPUs can now be disabled - that is, they will keep idling.
* Added syscalls _kern_set_cpu_enabled() and _kern_cpu_enabled(). * scheduler.c::sRunQueue::tail was not maintained at all; changed sRunQueue to be a simple thread pointer instead of a struct thread_queue. * Turns out we're monitoring CPU activity incorrectly when we've got more than one CPU. * Renamed the global CPU array from "cpu" to gCPU. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16186 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2005, Axel Dörfler, [email protected]. All rights reserved.
|
||||
* Copyright 2005-2006, Axel Dörfler, [email protected]. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
|
||||
#include <SupportDefs.h>
|
||||
|
||||
#include <syscalls.h>
|
||||
|
||||
|
||||
int _kset_mon_limit_(int num);
|
||||
int _kset_fd_limit_(int num);
|
||||
@@ -32,13 +34,13 @@ _kset_fd_limit_(int num)
|
||||
int
|
||||
_kget_cpu_state_(int cpuNum)
|
||||
{
|
||||
return 1;
|
||||
return _kern_cpu_enabled(cpuNum);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
_kset_cpu_state_(int cpuNum, int state)
|
||||
{
|
||||
return state ? B_OK : B_ERROR;
|
||||
return _kern_set_cpu_enabled(cpuNum, state != 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user