diff options
author | 2017-10-19 14:50:26 -0700 | |
---|---|---|
committer | 2017-10-24 13:03:45 -0700 | |
commit | b6b8de1758be800f170a15d7cf05fffc04619bb8 (patch) | |
tree | 24fba7fd8949352c707855e9bd46d4ca7c20db45 /doc/g_stands_for.md | |
parent | 80eee985f4646019a6d90e1187fd10d6319f81aa (diff) |
reland: cpu_linux: Don't spam sched_getcpu failures on qemu
__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.
Diffstat (limited to 'doc/g_stands_for.md')
0 files changed, 0 insertions, 0 deletions