|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
__NR_getcpu isn't implemented on qemu, and for some reason
sysconf(_SC_NPROCESSORS_ONLN) returns the number of processers
of the host system, giving a false indication that there is more
than one cpu for the qemu case.
Expand the init_num_cpus sequence to also run sched_getcpu once,
if GPR_MUSL_LIBC_COMPAT isn't defined.
If that call isn't supported, initialize 'ncpus' to 1.
Later, in gpr_cpu_current_cpu, use gpr_cpu_num_cores to avoid
the system call in cases where we know it isn't supported, or
if the ncpus is otherwise 1.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
__NR_getcpu isn't implemented on qemu, and for some reason
sysconf(_SC_NPROCESSORS_ONLN) returns the number of processers
of the host system, giving a false indication that there is more
than one cpu for the qemu case.
Expand the init_num_cpus sequence to also run sched_getcpu once,
and if that call isn't supported, initialize 'ncpus' to 1.
Later, in gpr_cpu_current_cpu, use gpr_cpu_num_cores to avoid
the system call in cases where we know it isn't supported, or
if the ncpus is otherwise 1.
|