]> git.hungrycats.org Git - linux/commitdiff
[PATCH] comment cleanups for cpu affinity syscall
authorRobert Love <rml@tech9.net>
Mon, 15 Apr 2002 07:00:12 +0000 (00:00 -0700)
committerLinus Torvalds <torvalds@penguin.transmeta.com>
Mon, 15 Apr 2002 07:00:12 +0000 (00:00 -0700)
A few (anal) comment cleanups and additions in relationship to the new
task cpu affinity syscalls.  All no brainers.

include/linux/capability.h
kernel/sched.c

index 1cccb9db2334b44bc7c90ed9f8e0f103e22139fc..39c4d290c83620c855437f052d74e572956aef35 100644 (file)
@@ -242,6 +242,7 @@ typedef __u32 kernel_cap_t;
 /* Allow use of FIFO and round-robin (realtime) scheduling on own
    processes and setting the scheduling algorithm used by another
    process. */
+/* Allow setting cpu affinity on other processes */
 
 #define CAP_SYS_NICE         23
 
index 3a9269f9eab70d35f944ce117d9955a10d022e06..c9bde194aa0833952d9655929f75aed68d4c1b5d 100644 (file)
@@ -1237,11 +1237,11 @@ out_unlock:
 /**
  * sys_sched_setaffinity - set the cpu affinity of a process
  * @pid: pid of the process
- * @len: length of new_mask
- * @new_mask: user-space pointer to the new cpu mask
+ * @len: length of the bitmask pointed to by user_mask_ptr
+ * @user_mask_ptr: user-space pointer to the new cpu mask
  */
 asmlinkage int sys_sched_setaffinity(pid_t pid, unsigned int len,
-                                     unsigned long *new_mask_ptr)
+                                     unsigned long *user_mask_ptr)
 {
        unsigned long new_mask;
        task_t *p;
@@ -1250,7 +1250,7 @@ asmlinkage int sys_sched_setaffinity(pid_t pid, unsigned int len,
        if (len < sizeof(new_mask))
                return -EINVAL;
 
-       if (copy_from_user(&new_mask, new_mask_ptr, sizeof(new_mask)))
+       if (copy_from_user(&new_mask, user_mask_ptr, sizeof(new_mask)))
                return -EFAULT;
 
        new_mask &= cpu_online_map;
@@ -1289,8 +1289,8 @@ out_unlock:
 /**
  * sys_sched_getaffinity - get the cpu affinity of a process
  * @pid: pid of the process
- * @len: length of the new mask
- * @user_mask_ptr: userspace pointer to the mask
+ * @len: length of the bitmask pointed to by user_mask_ptr
+ * @user_mask_ptr: user-space pointer to hold the current cpu mask
  */
 asmlinkage int sys_sched_getaffinity(pid_t pid, unsigned int len,
                                      unsigned long *user_mask_ptr)