Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: [yamt-idlelwp] src/sys



Module Name:    src
Committed By:   ad
Date:           Wed Mar 21 22:04:18 UTC 2007

Modified Files:
        src/sys/kern [yamt-idlelwp]: kern_sleepq.c kern_synch.c
        src/sys/sys [yamt-idlelwp]: lwp.h

Log Message:
Previously cpu_info::ci_curlwp was protected by the sched_mutex and this is
used in a few places to synchronise. Now the state of LWPs is protected
during switch by their current lock (which might be e.g. a sleep queue
lock). So ci_curlwp is unlocked, which is necessary to be able to do
preemption and to run interrupts as LWPs cheaply.

Add a (locked) flag to the lwp (LW_RUNNING) that indicates if it is on CPU
somewhere. More exactly, it means that the LWP's state is tied to a CPU, and
that the LWP has not yet switched away even if (l->l_cpu->ci_curcpu != l) or
(l->l_stat != LSONPROC).


To generate a diff of this commit:
cvs rdiff -r1.4.2.6 -r1.4.2.7 src/sys/kern/kern_sleepq.c
cvs rdiff -r1.177.2.16 -r1.177.2.17 src/sys/kern/kern_synch.c
cvs rdiff -r1.48.2.6 -r1.48.2.7 src/sys/sys/lwp.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index