Commit Graph

2 Commits

Author SHA1 Message Date
chenrun1
5bf24a15b5 lib_getnprocs:add #include <sys/types.h> instead of ifdef
Summary:
  Since there is a default definition for CONFIG_SMP_NCPUS in sys/types.h, we can remove #ifdef and return CONFIG_SMP_NCPUS directly.

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-08-21 02:04:15 +08:00
chenrun1
f3cf11dcb5 libc/msic:Implement get_nprocs API
Summary:
 1.Remove the macro definition of getnproc in sysinfo
 2.New get_nprocs_conf and get_nprocs interfaces, return CONFIG_SMP_NCPUS, return 1 when not defined

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-08-21 02:04:15 +08:00