patch-2.4.0-test2 linux/kernel/sched.c
Next file: linux/kernel/signal.c
Previous file: linux/kernel/panic.c
Back to the patch index
Back to the overall index
- Lines: 31
- Date:
Wed Jun 21 15:58:06 2000
- Orig file:
v2.4.0-test1/linux/kernel/sched.c
- Orig date:
Thu May 11 15:30:08 2000
diff -u --recursive --new-file v2.4.0-test1/linux/kernel/sched.c linux/kernel/sched.c
@@ -60,8 +60,8 @@
* The run-queue lock locks the parts that actually access
* and change the run-queues, and have to be interrupt-safe.
*/
-spinlock_t runqueue_lock = SPIN_LOCK_UNLOCKED; /* second */
-rwlock_t tasklist_lock = RW_LOCK_UNLOCKED; /* third */
+__cacheline_aligned spinlock_t runqueue_lock = SPIN_LOCK_UNLOCKED; /* second */
+__cacheline_aligned rwlock_t tasklist_lock = RW_LOCK_UNLOCKED; /* third */
static LIST_HEAD(runqueue_head);
@@ -920,16 +920,11 @@
if (pid < 0)
goto out_nounlock;
- read_lock(&tasklist_lock);
-
retval = -ESRCH;
+ read_lock(&tasklist_lock);
p = find_process_by_pid(pid);
- if (!p)
- goto out_unlock;
-
- retval = p->policy;
-
-out_unlock:
+ if (p)
+ retval = p->policy & ~SCHED_YIELD;
read_unlock(&tasklist_lock);
out_nounlock:
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)