| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
ok mpi@ kspillner@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a new assertion macro, KERNEL_ASSERT_LOCKED(), to assert that
kernel_lock is held. In the long process of removing kernel_lock, there will
be a lot (hundreds or thousands) of use of this; virtually almost all functions
in !MP-safe subsystems should have this assertion. Thus this assertion should
have a short, good name.
Not only that "KERNEL_ASSERT_LOCKED" is consistent with other KERNEL_* and
SCHED_ASSERT_LOCKED() macros.
Input from dlg@ guenther@ kettenis@.
OK dlg@ guenther@
|
|
|
|
|
|
|
| |
locked by a different thread. Teach lockstatus() to return LK_EXCLUSIVE
if an exclusive lock is held by some other thread.
ok beck@ tedu@
|
| |
|
| |
|
| |
|
|
|
|
|
| |
originally by thib.
ok deraadt jsing and anyone who tested
|
|
|
|
|
| |
.h files to pull it in, if needed
ok tedu
|
|
|
|
|
|
|
|
| |
the lock, but a change in member ordering meant it was using the same
address. Explicitly use different members instead of mixing address
of member and address of the lock itself.
ok miod@
|
|
|
|
|
|
|
| |
KERNEL_PROC_LOCK -> KERNEL_LOCK
KERNEL_PROC_UNLOCK -> KERNEL_UNLOCK
oga@ ok
|
|
|
|
|
|
|
|
|
|
|
|
| |
biglock in mi_switch and just check if we're holding the biglock.
The idea is that the first entry point into the kernel uses KERNEL_PROC_LOCK
and recursive calls use KERNEL_LOCK. This assumption is violated in at
least one place and has been causing confusion for lots of people.
Initial bug report and analysis from Pedro.
kettenis@ beck@ oga@ thib@ dlg@ ok
|
|
|
|
|
|
| |
where there is almost nothing left to them, so that we can continue getting
rid of them
ok oga
|
|
|
|
|
| |
from Brad Tilley <brad at 16systems dot com>;
ok oga@
|
|
|
|
| |
ok blambert@
|
|
|
|
|
|
| |
No binary change.
ok otto@
|
| |
|
|
|
|
|
|
| |
wich gets set and never checked etc...
ok art@,tedu@
|
| |
|
| |
|
|
|
|
|
|
| |
flag. This effectively makes the simplelock argument to lockmgr() fluff.
ok miod@
|
|
|
|
| |
ok pedro@ art@
|
|
|
|
|
|
|
|
|
|
|
|
| |
it's a good idea to use atomic.h operations on it. This mechanic
change updates all bit operations on p_flag to atomic_{set,clear}bits_int.
Only exception is that P_OWEUPC is set by MI code before calling
need_proftick and it's automatically cleared by ADDUPC. There's
no reason for MD handling of that flag since everyone handles it the
same way.
kettenis@ ok
|
|
|
|
| |
ok kettenis@ cloder@ tom@ henning@
|
|
|
|
|
|
|
|
|
|
|
| |
- LK_EXCLUPGRADE is never used.
- LK_REENABLE is never used.
- LK_SETRECURSE is never used. Because of this, the lk_recurselevel
field is always zero, so it can be removed to.
- the spinlock version (and LK_SPIN) is never used, since it was decided
to use different locking structure for MP-safe protection.
Tested by many
|
|
|
|
| |
from thordur i. bjornsson;
|
|
|
|
| |
'go for it' deraadt@
|
|
|
|
|
|
| |
of panics and bugfixes. Access curproc directly, do not expect a process
pointer as an argument. Should fix many "process context required" bugs.
Incentive and okay millert@, okay marc@. Various testing, thanks.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
everyone for the prompt review and ok of this work ;-) Yeah, that includes me
too, or maybe especially me. I am sorry.
Change the sched_lock to a mutex. This fixes, among other things, the infamous
"telnet localhost &" problem. The real bug in that case was that the sched_lock
which is by design a non-recursive lock, was recursively acquired, and not
enough releases made us hold the lock in the idle loop, blocking scheduling
on the other processors. Some of the other processors would hold the biglock though,
which made it impossible for cpu 0 to enter the kernel... A nice deadlock.
Let me just say debugging this for days just to realize that it was all fixed
in an old diff noone ever ok'd was somewhat of an anti-climax.
This diff also changes splsched to be correct for all our architectures.
|
|
|
|
| |
ok pedro@ tedu@
|
| |
|
|
|
|
| |
rescinded 22 July 1999. Proofed by myself and Theo.
|
| |
|
|
|
|
| |
LK_RECURSEFAIL are set.
|
| |
|
|
|
|
|
| |
an int this can safely be omitted but it is bad style to do so.
Closes PR 2223.
|
| |
|
|
|
|
|
| |
clean up the debug functions
add simple_lock_assert
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|