/third_party/ltp/lib/ |
D | tst_cpu.c | 29 long ncpus = -1; in tst_ncpus() local 31 ncpus = SAFE_SYSCONF(NULL, _SC_NPROCESSORS_ONLN); in tst_ncpus() 35 return ncpus; in tst_ncpus() 80 long ncpus = tst_ncpus_max(); in tst_ncpus_available() local 81 size_t cpusz = CPU_ALLOC_SIZE(ncpus); in tst_ncpus_available() 82 cpu_set_t *cpus = CPU_ALLOC(ncpus); in tst_ncpus_available() 91 ncpus = CPU_COUNT_S(cpusz, cpus); in tst_ncpus_available() 95 return ncpus; in tst_ncpus_available()
|
/third_party/grpc/src/core/lib/gpr/ |
D | cpu_linux.cc | 36 static int ncpus = 0; variable 42 ncpus = 1; in init_num_cpus() 48 ncpus = static_cast<int>(sysconf(_SC_NPROCESSORS_CONF)); in init_num_cpus() 49 if (ncpus < 1) { in init_num_cpus() 51 ncpus = 1; in init_num_cpus() 58 return static_cast<unsigned>(ncpus); in gpr_cpu_num_cores()
|
D | cpu_posix.cc | 34 static long ncpus = 0; variable 39 ncpus = sysconf(_SC_NPROCESSORS_CONF); in init_ncpus() 40 if (ncpus < 1 || ncpus > INT32_MAX) { in init_ncpus() 42 ncpus = 1; in init_ncpus() 49 return (unsigned)ncpus; in gpr_cpu_num_cores()
|
/third_party/ltp/testcases/kernel/syscalls/sched_setaffinity/ |
D | sched_setaffinity01.c | 92 long ncpus; in setup() local 93 ncpus = tst_ncpus_max(); in setup() 96 mask = CPU_ALLOC(ncpus); in setup() 100 mask_size = CPU_ALLOC_SIZE(ncpus); in setup() 105 emask = CPU_ALLOC(ncpus + 1); in setup() 109 emask_size = CPU_ALLOC_SIZE(ncpus + 1); in setup() 111 CPU_SET_S(ncpus, emask_size, emask); in setup()
|
/third_party/ltp/testcases/kernel/mem/cpuset/ |
D | cpuset01.c | 43 static long ncpus; variable 70 exit(mem_hog_cpuset(ncpus > 1 ? ncpus : 1)); in test_cpuset() 84 ncpus = count_cpu(); in setup() 174 int ncpus = 0; in count_cpu() local 176 while (path_exist(PATH_SYS_SYSTEM "/cpu/cpu%d", ncpus)) in count_cpu() 177 ncpus++; in count_cpu() 179 return ncpus; in count_cpu()
|
/third_party/ltp/testcases/kernel/controllers/cpuset/cpuset_lib/ |
D | cpuinfo.c | 25 int ncpus; variable 38 if (!ncpus) { in get_cpu_baseinfo() 39 ncpus = get_ncpus(); in get_cpu_baseinfo() 40 if (ncpus <= 0) in get_cpu_baseinfo() 50 cpus = malloc(sizeof(*cpus) * ncpus); in get_cpu_baseinfo() 53 memset(cpus, 0, sizeof(*cpus) * ncpus); in get_cpu_baseinfo() 68 if (data >= ncpus) { in get_cpu_baseinfo() 103 for (i = 0; i < ncpus; i++) { in online_cpumask() 225 if (ci < 0 || ci >= ncpus) { in get_sched_domains() 256 if (!ncpus) { in getcpuinfo() [all …]
|
D | libcpuset.c | 1202 int ncpus = cpuset_cpus_nbits(); in rebuild_map() local 1206 for (cpu = 0; cpu < (unsigned int)ncpus; cpu++) in rebuild_map() 1220 if (cpu >= (unsigned int)ncpus in rebuild_map() 1245 int ncpus = cpuset_cpus_nbits(); in load_map() local 1249 if ((cpunodemap.map = calloc(ncpus, sizeof(int))) == NULL) in load_map() 1254 for (cpu = 0; cpu < (unsigned int)ncpus; cpu++) in load_map() 1259 if (cpu >= (unsigned int)ncpus || mem >= (unsigned int)nmems) in load_map() 1281 int ncpus = cpuset_cpus_nbits(); in store_map() local 1290 for (cpu = 0; cpu < (unsigned int)ncpus; cpu++) { in store_map() 1359 int ncpus = cpuset_cpus_nbits(); in cpuset_localcpus() local [all …]
|
D | cpuinfo.h | 13 extern int ncpus;
|
/third_party/ltp/include/lapi/ |
D | cpuset.h | 24 #define CPU_ALLOC(ncpus) malloc(sizeof(cpu_set_t)); \ argument 25 if (ncpus > CPU_SETSIZE) { \ 27 "Your libc does not support masks with %ld cpus", (long)ncpus); \
|
/third_party/ltp/testcases/cve/ |
D | cve-2015-3290.c | 403 int i, ncpus; in do_child() local 411 ncpus = tst_ncpus(); in do_child() 412 threads = SAFE_MALLOC(sizeof(*threads) * ncpus); in do_child() 414 for (i = 0; i < ncpus; i++) in do_child() 420 for (i = 0; i < ncpus; i++) { in do_child()
|
/third_party/ltp/testcases/kernel/mem/tunable/ |
D | overcommit_memory.c | 246 long ncpus = tst_ncpus_conf(); in calculate_total_batch_size() local 251 long batch_size = MAX(ncpus * 2, in calculate_total_batch_size() 254 (long)(info.totalram / pagesize) / ncpus / 256 in calculate_total_batch_size() 262 total_batch_size = (batch_size * ncpus * pagesize) / KB; in calculate_total_batch_size()
|
/third_party/ltp/tools/apicmds/ |
D | Makefile | 30 res resm ncpus ncpus_conf ncpus_max \
|
/third_party/libuv/src/unix/ |
D | aix.c | 1049 int result, ncpus, idx = 0; in uv_cpu_info() local 1056 ncpus = result = perfstat_cpu(NULL, NULL, sizeof(perfstat_cpu_t), 0); in uv_cpu_info() 1061 ps_cpus = (perfstat_cpu_t*) uv__malloc(ncpus * sizeof(perfstat_cpu_t)); in uv_cpu_info() 1068 result = perfstat_cpu(&cpu_id, ps_cpus, sizeof(perfstat_cpu_t), ncpus); in uv_cpu_info() 1074 *cpu_infos = (uv_cpu_info_t*) uv__malloc(ncpus * sizeof(uv_cpu_info_t)); in uv_cpu_info() 1080 *count = ncpus; in uv_cpu_info() 1083 while (idx < ncpus) { in uv_cpu_info()
|
/third_party/ltp/testcases/kernel/mem/lib/ |
D | mem.c | 604 int ncpus = 0; in gather_node_cpus() local 610 while (path_exist(PATH_SYS_SYSTEM "/cpu/cpu%d", ncpus)) in gather_node_cpus() 611 ncpus++; in gather_node_cpus() 613 for (i = 0; i < ncpus; i++) { in gather_node_cpus()
|
/third_party/ltp/testcases/kernel/controllers/cpuset/cpuset_load_balance_test/ |
D | cpuset_sched_domains_check.c | 118 for (i = 0; i < ncpus; i++) { in check_sched_domains()
|
/third_party/pulseaudio/src/pulsecore/ |
D | core-util.c | 3100 long ncpus; in pa_ncpus() local 3103 ncpus = sysconf(_SC_NPROCESSORS_ONLN); in pa_ncpus() 3105 ncpus = 1; in pa_ncpus() 3108 return ncpus <= 0 ? 1 : (unsigned) ncpus; in pa_ncpus()
|
/third_party/python/Modules/ |
D | posixmodule.c | 7041 int ncpus; in os_sched_setaffinity_impl() local 7050 ncpus = NCPUS_START; in os_sched_setaffinity_impl() 7051 setsize = CPU_ALLOC_SIZE(ncpus); in os_sched_setaffinity_impl() 7052 cpu_set = CPU_ALLOC(ncpus); in os_sched_setaffinity_impl() 7080 if (cpu >= ncpus) { in os_sched_setaffinity_impl() 7082 int newncpus = ncpus; in os_sched_setaffinity_impl() 7102 ncpus = newncpus; in os_sched_setaffinity_impl() 7140 int cpu, ncpus, count; in os_sched_getaffinity_impl() local 7145 ncpus = NCPUS_START; in os_sched_getaffinity_impl() 7147 setsize = CPU_ALLOC_SIZE(ncpus); in os_sched_getaffinity_impl() [all …]
|