[haiku-3rdparty-dev] Re: not finding 'get_system_info'

  • From: Yourself <pete.goodeve@xxxxxxxxxxxx>
  • To: haiku-3rdparty-dev@xxxxxxxxxxxxx
  • Date: Fri, 8 Aug 2014 15:03:03 -0700

On Fri, Aug 08, 2014 at 12:54:04PM -0400, Andrew Hudson wrote:
>
> >Things have changed (CPU infos removed from the system_info structure, 
> >function call no longer redirected via macro to _get_system_info()), but 
> >apart from that the API can still be used.
> 
> 
> Just curious, how do you retrieve CPU info that was removed?
> 
I think I can answer that one (:-))

The new get_cpu_info call does that.  In this particular case, I simply 
replaced the use of ...cpu_infos[i] in a for-loop with:

                cpu_info cpu;
                get_cpu_info(i, 1, &cpu);
-- and used the values in cpu

With a bit more rearrangement I could have made a cpu[N] array and made 
the second parameter of the call appropriately > 1.

        -- Pete --


Other related posts: