hwlocality_glibc_sched.3 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. .TH "hwlocality_glibc_sched" 3 "Thu Sep 7 2023" "Version 2.9.3" "Hardware Locality (hwloc)" \" -*- nroff -*-
  2. .ad l
  3. .nh
  4. .SH NAME
  5. hwlocality_glibc_sched \- Interoperability with glibc sched affinity
  6. .SH SYNOPSIS
  7. .br
  8. .PP
  9. .SS "Functions"
  10. .in +1c
  11. .ti -1c
  12. .RI "static int \fBhwloc_cpuset_to_glibc_sched_affinity\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP hwlocset, cpu_set_t *schedset, size_t schedsetsize)"
  13. .br
  14. .ti -1c
  15. .RI "static int \fBhwloc_cpuset_from_glibc_sched_affinity\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_cpuset_t\fP hwlocset, const cpu_set_t *schedset, size_t schedsetsize)"
  16. .br
  17. .in -1c
  18. .SH "Detailed Description"
  19. .PP
  20. This interface offers ways to convert between hwloc cpusets and glibc cpusets such as those manipulated by sched_getaffinity() or pthread_attr_setaffinity_np()\&.
  21. .PP
  22. \fBNote\fP
  23. .RS 4
  24. Topology \fCtopology\fP must match the current machine\&.
  25. .RE
  26. .PP
  27. .SH "Function Documentation"
  28. .PP
  29. .SS "static int hwloc_cpuset_from_glibc_sched_affinity (\fBhwloc_topology_t\fP topology, \fBhwloc_cpuset_t\fP hwlocset, const cpu_set_t * schedset, size_t schedsetsize)\fC [inline]\fP, \fC [static]\fP"
  30. .PP
  31. Convert glibc sched affinity CPU set \fCschedset\fP 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\&.
  32. .PP
  33. \fCschedsetsize\fP should be sizeof(cpu_set_t) unless \fCschedset\fP was dynamically allocated with CPU_ALLOC
  34. .PP
  35. \fBReturns\fP
  36. .RS 4
  37. 0 on success\&.
  38. .PP
  39. -1 with errno set to \fCENOMEM\fP if some internal reallocation failed\&.
  40. .RE
  41. .PP
  42. .SS "static int hwloc_cpuset_to_glibc_sched_affinity (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP hwlocset, cpu_set_t * schedset, size_t schedsetsize)\fC [inline]\fP, \fC [static]\fP"
  43. .PP
  44. Convert hwloc CPU set \fCtoposet\fP into glibc sched affinity CPU set \fCschedset\fP\&. This function may be used before calling sched_setaffinity or any other function that takes a cpu_set_t as input parameter\&.
  45. .PP
  46. \fCschedsetsize\fP should be sizeof(cpu_set_t) unless \fCschedset\fP was dynamically allocated with CPU_ALLOC
  47. .PP
  48. \fBReturns\fP
  49. .RS 4
  50. 0\&.
  51. .RE
  52. .PP
  53. .SH "Author"
  54. .PP
  55. Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code\&.