aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/support/cpu_linux.cc
Commit message (Collapse)AuthorAge
* reland: cpu_linux: Don't spam sched_getcpu failures on qemuGravatar Ian Coolidge2017-10-24
| | | | | | | | | | | | | | | __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.
* Revert "cpu_linux: Don't spam sched_getcpu failures on qemu"Gravatar Vijay Pai2017-10-19
|
* cpu_linux: Don't spam sched_getcpu failures on qemuGravatar Ian Coolidge2017-10-16
| | | | | | | | | | | | | | __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.
* Changes for C to C++. Adding extern C to header files for compatibility.Gravatar Yash Tibrewal2017-10-02
Also converting to .cc