Skip to content

Commit ae89408

Browse files
makelinuxIngo Molnar
authored andcommitted
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 <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 97efd28 commit ae89408

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

include/linux/sched.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1858,7 +1858,17 @@ extern int task_can_attach(struct task_struct *p);
18581858
extern int dl_bw_alloc(int cpu, u64 dl_bw);
18591859
extern void dl_bw_free(int cpu, u64 dl_bw);
18601860
#ifdef CONFIG_SMP
1861+
1862+
/* do_set_cpus_allowed() - consider using set_cpus_allowed_ptr() instead */
18611863
extern void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask);
1864+
1865+
/**
1866+
* set_cpus_allowed_ptr - set CPU affinity mask of a task
1867+
* @p: the task
1868+
* @new_mask: CPU affinity mask
1869+
*
1870+
* Return: zero if successful, or a negative error code
1871+
*/
18621872
extern int set_cpus_allowed_ptr(struct task_struct *p, const struct cpumask *new_mask);
18631873
extern int dup_user_cpus_ptr(struct task_struct *dst, struct task_struct *src, int node);
18641874
extern void release_user_cpus_ptr(struct task_struct *p);

0 commit comments

Comments
 (0)