hwlocality_glibc_sched(3)
β¨ NAME β¨
hwlocality_glibc_sched β Interoperability with glibc sched affinity π
Hey bestie, welcome to hwlocality_glibc_sched(3) from the Library Functions Manual β this is the little corner of hwloc that lets your hwloc cpusets and your glibc sched cpusets speak the same language. π«Ά
πΈ SYNOPSIS πΈ
Functions
int hwloc_cpuset_to_glibc_sched_affinity (hwloc_topology_t topology,
hwloc_const_cpuset_t hwlocset, cpu_set_t *schedset, size_t
schedsetsize)
int hwloc_cpuset_from_glibc_sched_affinity (hwloc_topology_t topology,
hwloc_cpuset_t hwlocset, const cpu_set_t *schedset, size_t
schedsetsize)
π¦ DETAILED DESCRIPTION π¦
This interface offers ways to convert between hwloc cpusets and glibc cpusets such as those manipulated by sched_getaffinity() or pthread_attr_setaffinity_np(). Literally the bridge between your hwloc world and your glibc sched world, no cap. π
Note: Topology topology must match the current machine. π
π FUNCTION DOCUMENTATION π
π hwloc_cpuset_from_glibc_sched_affinity
int hwloc_cpuset_from_glibc_sched_affinity (hwloc_topology_t topology,
hwloc_cpuset_t hwlocset, const cpu_set_t * schedset, size_t
schedsetsize) [inline]
Convert glibc sched affinity CPU set schedset into hwloc CPU set. This function may be used before calling sched_setaffinity or any other function that takes a cpu_set_t as input parameter. Itβs giving βtranslate the glibc cpuset into hwloc cpusetβ energy. π§
schedsetsize should be sizeof(cpu_set_t) unless schedset was dynamically allocated with CPU_ALLOC.
Returns
0on success. β¨-1witherrnoset toENOMEMif some internal reallocation failed. π
π§ hwloc_cpuset_to_glibc_sched_affinity
int hwloc_cpuset_to_glibc_sched_affinity (hwloc_topology_t topology,
hwloc_const_cpuset_t hwlocset, cpu_set_t * schedset, size_t
schedsetsize) [inline]
Convert hwloc CPU set toposet into glibc sched affinity CPU set schedset. This function may be used before calling sched_setaffinity or any other function that takes a cpu_set_t as input parameter. Same bestie energy, opposite direction. π«
schedsetsize should be sizeof(cpu_set_t) unless schedset was dynamically allocated with CPU_ALLOC.
Returns
0. Periodt. π
π¦ AUTHOR π¦
Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code. π«Ά
Made with main-character energy from Hardware Locality (hwloc), Version 2.15.0, for the page hwlocality_glibc_sched(3). ππβ¨
π¦ where this page comes from
- arch rolling: hwloc 2.15.0-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms