/third_party/ltp/testcases/kernel/controllers/cpuset/cpuset_hierarchy_test/ |
H A D | cpuset_hierarchy_test.sh | 45 echo > "$CPUSET/father/cpuset.cpus" || return 1 46 echo > "$CPUSET/father/child/cpuset.cpus" || return 1 48 cpuset_log "father cpuset.cpus $(cat "$CPUSET/father/cpuset.cpus")" 49 cpuset_log "child cpuset.cpus $(cat "$CPUSET/father/child/cpuset.cpus")" 51 test -z "$(cat "$CPUSET/father/cpuset.cpus")" || return 1 52 test -z "$(cat "$CPUSET/father/child/cpuset.cpus")" || return 1 57 echo > "$CPUSET/father/cpuset.cpus" || return 1 58 echo 0 > "$CPUSET/father/child/cpuset [all...] |
/third_party/ltp/testcases/kernel/controllers/cpuset/cpuset_lib/ |
H A D | cpuset.h | 2 * cpuset header file 26 * cpusets - basic routines (use cpuset relative numbering of CPUs) 30 * cpuset_pin(int relcpu) - Pin current task to one CPU in its cpuset. 31 * cpuset_size() - How many CPUs are in current tasks cpuset? 32 * cpuset_where() - Most recent CPU in current tasks cpuset that task ran on. 33 * cpuset_unpin() - Undo cpuset_pin(), let task run anywhere in its cpuset. 44 * ==== Allocate and free struct cpuset ==== 46 * cpuset_alloc() - Allocate a new struct cpuset 47 * cpuset_free(struct cpuset *cp) - Free struct cpuset *c [all...] |
H A D | libcpuset.c | 2 * cpuset user library implementation. 47 #include "cpuset.h" 69 struct cpuset { struct 92 * we create a new cpuset, we don't accidentally overwrite 132 /* Presumed cpuset file system mount point */ 133 static const char *cpusetmnt = "/dev/cpuset"; 219 * Check that cpusets supported, /dev/cpuset mounted. 223 * ENODEV - /dev/cpuset not mounted 238 if (stat("/proc/self/cpuset", &statbuf) < 0) { in check() 243 if (stat("/dev/cpuset/task in check() 3189 struct cpuset *cpuset; global() member [all...] |
H A D | cpuinfo.c | 11 #include "cpuset.h" 287 /* get the number of the cpuset groups */ 302 if (!strncmp(buf, "cpuset", 6)) { in get_num_cpusets() 313 static struct cpuset **cpusets; 318 struct cpuset *cp = NULL; in find_domain_cpusets() 371 warnx("cpuset subsystem is't compiled into kernel."); in partition_domains() 426 struct cpuset *cpa = cpusets[i]; in partition_domains() 434 struct cpuset *cpb = cpusets[j]; in partition_domains() 462 warnx("cpuset getcpus failed."); in partition_domains()
|
/third_party/pulseaudio/src/tests/ |
H A D | atomic-test.c | 62 cpuset_t cpuset; member 64 cpu_set_t cpuset; member 72 pthread_setaffinity_np(pthread_self(), sizeof(io->cpuset), &io->cpuset); in read_func() 86 pthread_setaffinity_np(pthread_self(), sizeof(io->cpuset), &io->cpuset); in write_func() 109 CPU_ZERO(&io1.cpuset); in START_TEST() 110 CPU_SET(1, &io1.cpuset); in START_TEST() 113 CPU_ZERO(&io2.cpuset); in START_TEST() 114 CPU_SET(3, &io2.cpuset); in START_TEST() [all...] |
H A D | rtstutter.c | 35 #include <sys/cpuset.h>
|
H A D | once-test.c | 28 #include <sys/cpuset.h>
|
/third_party/skia/third_party/externals/swiftshader/third_party/marl/src/ |
H A D | thread.cpp | 151 cpu_set_t cpuset; in all() local 152 CPU_ZERO(&cpuset); in all() 153 if (pthread_getaffinity_np(thread, sizeof(cpu_set_t), &cpuset) == 0) { in all() 154 int count = CPU_COUNT(&cpuset); in all() 163 cpuset_t cpuset; in all() local 164 CPU_ZERO(&cpuset); in all() 165 if (pthread_getaffinity_np(thread, sizeof(cpuset_t), &cpuset) == 0) { in all() 166 int count = CPU_COUNT(&cpuset); in all() 379 cpu_set_t cpuset; in setAffinity() local 380 CPU_ZERO(&cpuset); in setAffinity() 387 cpuset_t cpuset; setAffinity() local [all...] |
/third_party/libuv/src/unix/ |
H A D | thread.c | 49 # include <sys/cpuset.h> 188 uv__cpu_set_t cpuset; in uv_thread_setaffinity() local 203 CPU_ZERO(&cpuset); in uv_thread_setaffinity() 206 CPU_SET(i, &cpuset); in uv_thread_setaffinity() 209 if (sched_setaffinity(pthread_gettid_np(*tid), sizeof(cpuset), &cpuset)) in uv_thread_setaffinity() 214 r = pthread_setaffinity_np(*tid, sizeof(cpuset), &cpuset); in uv_thread_setaffinity() 226 uv__cpu_set_t cpuset; in uv_thread_getaffinity() local 235 CPU_ZERO(&cpuset); in uv_thread_getaffinity() [all...] |
/third_party/ltp/testcases/kernel/controllers/cpuset/ |
H A D | cpuset_funcs.sh | 3 # functions for cpuset test 58 CPUSET="/dev/cpuset" 60 CLONE_CHILDREN="/dev/cpuset/cgroup.clone_children" 63 SCHED_LB="/dev/cpuset/cpuset.sched_load_balance" 118 CPUSET_CONTROLLER=`grep -w cpuset /proc/cgroups | cut -f1` 119 CPUSET_CONTROLLER_VALUE=`grep -w cpuset /proc/cgroups | cut -f4` 121 if [ "$CPUSET_CONTROLLER" = "cpuset" ] && [ "$CPUSET_CONTROLLER_VALUE" = "1" ] 153 # Create /dev/cpuset & mount the cgroup file system with cpuset [all...] |
/third_party/rust/crates/rustix/src/process/ |
H A D | sched.rs | 78 /// `sched_setaffinity(pid, cpuset)`—Set a thread's CPU affinity mask. 91 pub fn sched_setaffinity(pid: Option<Pid>, cpuset: &CpuSet) -> io::Result<()> { in sched_setaffinity() 92 backend::process::syscalls::sched_setaffinity(pid, &cpuset.cpu_set) in sched_setaffinity() 108 let mut cpuset = CpuSet::new(); in sched_getaffinity() variables 109 backend::process::syscalls::sched_getaffinity(pid, &mut cpuset.cpu_set).and(Ok(cpuset)) in sched_getaffinity()
|
/third_party/mesa3d/src/util/ |
H A D | u_thread.h | 174 cpu_set_t cpuset; in util_set_thread_affinity() local 177 if (pthread_getaffinity_np(thread, sizeof(cpuset), &cpuset) != 0) in util_set_thread_affinity() 182 if (CPU_ISSET(i, &cpuset)) in util_set_thread_affinity() 187 CPU_ZERO(&cpuset); in util_set_thread_affinity() 190 CPU_SET(i, &cpuset); in util_set_thread_affinity() 192 return pthread_setaffinity_np(thread, sizeof(cpuset), &cpuset) == 0; in util_set_thread_affinity()
|
/third_party/toybox/toys/other/ |
H A D | taskset.c | 38 #define sched_setaffinity(pid, size, cpuset) \ 39 syscall(__NR_sched_setaffinity, (pid_t)pid, (size_t)size, (void *)cpuset) 40 #define sched_getaffinity(pid, size, cpuset) \ 41 syscall(__NR_sched_getaffinity, (pid_t)pid, (size_t)size, (void *)cpuset)
|
/third_party/musl/porting/liteos_a/user/src/sched/ |
H A D | affinity.c | 26 unsigned int cpuset; in do_getaffinity() local 30 int ret = __syscall(SYS_sched_getaffinity, tid, &cpuset, flag); in do_getaffinity() 34 set->__bits[0] = (long)cpuset; in do_getaffinity()
|
/third_party/rust/crates/nix/src/ |
H A D | sched.rs | 247 /// The `cpuset` argument specifies the set of CPUs on which the thread 262 pub fn sched_setaffinity(pid: Pid, cpuset: &CpuSet) -> Result<()> { in sched_setaffinity() 267 &cpuset.cpu_set, in sched_setaffinity() 280 /// Returned `cpuset` is the set of CPUs on which the thread 297 let mut cpuset = CpuSet::new(); in sched_getaffinity() variables 302 &mut cpuset.cpu_set, in sched_getaffinity() 306 Errno::result(res).and(Ok(cpuset)) in sched_getaffinity()
|
/third_party/musl/src/sched/ |
H A D | affinity.c | 35 unsigned int cpuset; in do_getaffinity() local 39 int ret = __syscall(SYS_sched_getaffinity, tid, &cpuset, flag); in do_getaffinity() 43 set->__bits[0] = (long)cpuset; in do_getaffinity()
|
/third_party/ffmpeg/libavutil/ |
H A D | cpu.c | 205 cpu_set_t cpuset; in av_cpu_count() local 207 CPU_ZERO(&cpuset); in av_cpu_count() 209 if (!sched_getaffinity(0, sizeof(cpuset), &cpuset)) in av_cpu_count() 210 nb_cpus = CPU_COUNT(&cpuset); in av_cpu_count()
|
/third_party/musl/Benchmark/musl/ |
H A D | benchmark_framework.cpp | 160 cpu_set_t cpuset; in LockAndRun() local 161 CPU_ZERO(&cpuset); in LockAndRun() 162 CPU_SET(cpuNum, &cpuset); in LockAndRun() 164 if (sched_setaffinity(0, sizeof(cpuset), &cpuset) != 0) { in LockAndRun()
|
/third_party/ltp/testcases/kernel/controllers/ |
H A D | Makefile | 15 FILTER_OUT_DIRS += cpuset
|
/third_party/musl/porting/liteos_a_newlib/kernel/include/sys/ |
H A D | _pthreadtypes.h | 68 cpu_set_t cpuset; member
|
/third_party/rust/crates/libc/src/unix/linux_like/emscripten/ |
H A D | mod.rs | 1692 pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () { in CPU_ZERO() 1693 for slot in cpuset.bits.iter_mut() { in CPU_ZERO() 1698 pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () { in CPU_SET() 1700 = 8 * ::mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc in CPU_SET() 1702 cpuset.bits[idx] |= 1 << offset; in CPU_SET() 1706 pub fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () { in CPU_CLR() 1708 = 8 * ::mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc in CPU_CLR() 1710 cpuset.bits[idx] &= !(1 << offset); in CPU_CLR() 1714 pub fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool { in CPU_ISSET() 1715 let size_in_bits = 8 * ::mem::size_of_val(&cpuset in CPU_ISSET() [all...] |
/third_party/rust/crates/libc/src/unix/linux_like/android/ |
H A D | mod.rs | 3009 pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () { in CPU_ZERO() 3010 for slot in cpuset.__bits.iter_mut() { in CPU_ZERO() 3015 pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () { in CPU_SET() 3017 = 8 * ::mem::size_of_val(&cpuset.__bits[0]); // 32, 64 etc in CPU_SET() 3019 cpuset.__bits[idx] |= 1 << offset; in CPU_SET() 3023 pub fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () { in CPU_CLR() 3025 = 8 * ::mem::size_of_val(&cpuset.__bits[0]); // 32, 64 etc in CPU_CLR() 3027 cpuset.__bits[idx] &= !(1 << offset); in CPU_CLR() 3031 pub fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool { in CPU_ISSET() 3032 let size_in_bits = 8 * ::mem::size_of_val(&cpuset in CPU_ISSET() [all...] |
/third_party/rust/crates/libc/src/unix/linux_like/linux/ |
H A D | mod.rs | 3620 pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () { in CPU_ZERO() 3621 for slot in cpuset.bits.iter_mut() { in CPU_ZERO() 3626 pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () { in CPU_SET() 3628 = 8 * ::mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc in CPU_SET() 3630 cpuset.bits[idx] |= 1 << offset; in CPU_SET() 3634 pub fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () { in CPU_CLR() 3636 = 8 * ::mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc in CPU_CLR() 3638 cpuset.bits[idx] &= !(1 << offset); in CPU_CLR() 3642 pub fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool { in CPU_ISSET() 3643 let size_in_bits = 8 * ::mem::size_of_val(&cpuset in CPU_ISSET() [all...] |
/third_party/rust/crates/libc/src/unix/bsd/freebsdlike/dragonfly/ |
H A D | mod.rs | 1558 pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () { in CPU_ZERO() 1559 for slot in cpuset.ary.iter_mut() { in CPU_ZERO() 1564 pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () { in CPU_SET() 1566 cpuset.ary[idx] |= 1 << offset; in CPU_SET() 1570 pub fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () { in CPU_CLR() 1572 cpuset.ary[idx] &= !(1 << offset); in CPU_CLR() 1576 pub fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool { in CPU_ISSET() 1578 0 != cpuset.ary[idx] & (1 << offset) in CPU_ISSET()
|
/third_party/rust/crates/libc/src/unix/bsd/freebsdlike/freebsd/ |
H A D | mod.rs | 1910 // sys/cpuset.h 3859 pub fn CPU_ZERO(cpuset: &mut cpuset_t) -> () { in CPU_ZERO() 3860 for slot in cpuset.__bits.iter_mut() { in CPU_ZERO() 3865 pub fn CPU_FILL(cpuset: &mut cpuset_t) -> () { in CPU_FILL() 3866 for slot in cpuset.__bits.iter_mut() { in CPU_FILL() 3871 pub fn CPU_SET(cpu: usize, cpuset: &mut cpuset_t) -> () { in CPU_SET() 3874 cpuset.__bits[idx] |= 1 << offset; in CPU_SET() 3878 pub fn CPU_CLR(cpu: usize, cpuset: &mut cpuset_t) -> () { in CPU_CLR() 3881 cpuset.__bits[idx] &= !(1 << offset); in CPU_CLR() 3885 pub fn CPU_ISSET(cpu: usize, cpuset 4294 pub fn cpuset(setid: *mut ::cpusetid_t) -> ::c_int; cpuset() functions [all...] |