Commit ae894083 authored by Costa Shulyupin's avatar Costa Shulyupin Committed by Ingo Molnar
Browse files

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: default avatarCosta Shulyupin <costa.shul@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20230829082551.2661290-1-costa.shul@redhat.com
parent 97efd283
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -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);