[haiku-development] Re: RFC: Removing B_MAX_CPU_NUM and reworking system_info

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Tue, 03 Dec 2013 15:17:16 +0100

On 12/02/2013 08:38 PM, Andrew Hudson wrote:
 >From: Pawel Dziepak <pdziepak@xxxxxxxxxxx>

It's high time we got rid of our 8 CPU limit. Unfortunately, BeOS has
left us with B_MAX_CPU_NUM as a part of the public interface, what
makes it not a trivial task.

First of all, I believe B_MAX_CPU_NUM, system_info, cpu_info and
get_system_info() should be remove from public API (obviously
application would still be able to link against get_system_info(), the
binary interface remains unchanged). get_system_info() would keep
reporting no more than 8 CPUs due to the limitations of the
system_info type.
To keep environment consistent for the legacy applications sysconf()
would report no more than 8 CPUs if __gABIVersion <
B_HAIKU_ABI_GCC_2_HAIKU.

The above, should deal with the legacy binaries. New API has to be
created to allow programs to get system information in a more future
proof way. Here is what I propose:

It's my understanding that changing B_MAX_CPU_NUM will break
compatibility with legacy apps, correct?

No, incorrect.

CU, Ingo


Other related posts: