[haiku-development] Re: cpu_clock_speed -- why gone?

  • From: Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sat, 18 Mar 2017 05:30:53 +0100

Hah!  So that's how it was done.  Interesting!

So can one expect that to be the case as long as BeOS compatibility
is maintained?  I dummied up a 'SysInfoBeOS.h' using the old BeOS
struct and a "get_BeOS_system_info(...)" call that invokes the
legacy "_get_system_info(...)" from the OS.  Gets me back the original
behaviour.  Is this  a horrible thing to do? (:-/)

It was removed from there for a good reason. The API was reworked and
extended to provide more accurate info about the CPUs, which can run at
different frequencies. The new scheduler uses this information to make
better guesses at which CPU to use.

You can use get_cpu_topology_info to get the number of cores, and the
default frequency for each. 

-- 
Adrien.

Other related posts: