summaryrefslogtreecommitdiff
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorCosta Shulyupin <costa.shul@redhat.com>2023-08-29 11:25:51 +0300
committerIngo Molnar <mingo@kernel.org>2023-08-29 21:02:58 +0200
commitae89408341f59e39d3b7d9e0d58905722136a176 (patch)
tree28b3c74ad88dda6c442f54a8bae339ae9ac06810 /include/linux/sched.h
parent97efd28334e271a7e1112ac4dca24d3feea8404b (diff)
sched/core: Add kernel-doc for set_cpus_allowed_ptr()
This is an exported symbol, so it should have kernel-doc. Add a note to very similar function do_set_cpus_allowed() to avoid confusion and misuse. Signed-off-by: Costa Shulyupin <costa.shul@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20230829082551.2661290-1-costa.shul@redhat.com
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 177b3f3676ef..ae6fd76afaf5 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1858,7 +1858,17 @@ extern int task_can_attach(struct task_struct *p);
extern int dl_bw_alloc(int cpu, u64 dl_bw);
extern void dl_bw_free(int cpu, u64 dl_bw);
#ifdef CONFIG_SMP
+
+/* do_set_cpus_allowed() - consider using set_cpus_allowed_ptr() instead */
extern void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask);
+
+/**
+ * set_cpus_allowed_ptr - set CPU affinity mask of a task
+ * @p: the task
+ * @new_mask: CPU affinity mask
+ *
+ * Return: zero if successful, or a negative error code
+ */
extern int set_cpus_allowed_ptr(struct task_struct *p, const struct cpumask *new_mask);
extern int dup_user_cpus_ptr(struct task_struct *dst, struct task_struct *src, int node);
extern void release_user_cpus_ptr(struct task_struct *p);