09/10/2021 09:41, Narcisa Ana Maria Vasile:
From: Narcisa Vasile <redacted>
Implement functions for getting/setting thread affinity.
Threads can be pinned to specific cores by setting their
affinity attribute.
Signed-off-by: Narcisa Vasile <redacted>
Signed-off-by: Dmitry Malloy <redacted>
[...]
+/**
+ * Set the affinity of thread 'thread_id' to the cpu set
+ * specified by 'cpuset'.
+ *
+ * @param thread_id
+ * Id of the thread for which to set the affinity.
+ *
+ * @param cpuset
+ * Pointer to CPU affinity to set.
+ *
+ * @return
+ * On success, return 0.
+ * On failure, return a positive errno-style error number.
Usually we return negative numbers on error.