Commit Graph

2262 Commits

Author SHA1 Message Date
thorpej 14c0be9cd4 Protect hardclock_ticks and softclock_ticks with the callwheel
lock to prevent a race between hardclock() and callout_reset().
2000-08-21 23:51:33 +00:00
thorpej b7e86fa7a8 spllowersoftclock() is already void; no need to cast it. 2000-08-21 23:43:30 +00:00
thorpej 012500bf1f Add a lock for the callwheel (callout facility), and only go to
splclock() while holding it.
2000-08-21 23:40:56 +00:00
enami d707b78562 Declare this static simplelock data only when MULTIPROCESSOR or LOCKDEBUG is
defined to prevent compiler warning.
2000-08-21 06:42:57 +00:00
thorpej 7da965dade splsched() is appropriate for select()/poll(). 2000-08-21 06:27:59 +00:00
thorpej 5573e863c7 - Clean up _simple_lock_held()
- In simple_lock_switchcheck(), allow/enforce exactly one lock to be
  held: sched_lock.
- Per e-mail to tech-smp from Bill Sommerfeld, r/w spin locks have
  an interlock at splsched(), rather than splhigh().
2000-08-21 02:17:45 +00:00
sommerfeld 78e4a089b8 Don't bother reinitializing statically-inited locks 2000-08-21 02:16:30 +00:00
thorpej f42254818f splhigh() -> splsched() 2000-08-21 02:09:33 +00:00
thorpej a86d1f4891 Add a lock around the scheduler, and use it as necessary, including
in the non-MULTIPROCESSOR case (LOCKDEBUG requires it).  Scheduler
lock is held upon entry to mi_switch() and cpu_switch(), and
cpu_switch() releases the lock before returning.

Largely from Bill Sommerfeld, with some minor bug fixes and
machine-dependent code hacking from me.
2000-08-20 21:50:06 +00:00
thorpej 8bc6ee56cb Lock debugging fix: Make sure a simplelock's lock_holder gets
initialized properly, and consistently tracks the owning CPU's
cpuid.  Add some diagnostic assertions to enforce this.
2000-08-19 19:36:18 +00:00
sommerfeld 8875442492 Statically initialize statically-allocated locks 2000-08-19 17:25:33 +00:00
cgd 0199b04bef update for changed makesyscalls.master 2000-08-18 19:35:15 +00:00
cgd 6858b430d3 tweak white space around generated NetBSD rcs ids 2000-08-18 19:33:30 +00:00
cgd c07a11c347 nuke __P for generated syscall prototypes and sy_call_t 2000-08-18 19:14:33 +00:00
itojun f5fa53578a repair m_dup(). specifically, now it is safe against non-MCLBYTES cluster
mbuf.  noone seem to be using this function at this moment.
2000-08-18 16:19:22 +00:00
itojun 243eebc256 disable m_dup(), as it makes false assumption on cluster mbuf and unsafe
(does not do the right thing).
2000-08-18 14:23:48 +00:00
itojun 1905ac079e add a comment about false assumption made by m_dup() 2000-08-18 14:12:47 +00:00
thorpej 3a1f5cdbfc If maniuplating a read lock on the proc list, we no longer need
to go to splclock() -- spinlockmgr() handles the interrupt blocking
while holding the interlock for us, now.
2000-08-17 14:37:54 +00:00
thorpej 391e1e1f44 For spinlocks, block interrupts while holding the interlock. Partially
from Bill Sommerfeld.
2000-08-17 14:36:32 +00:00
thorpej b6aaff9c44 Add a DIAGNOSTIC check for release of an unlocked lock.
From Bill Sommerfeld.
2000-08-17 04:18:21 +00:00
thorpej f2098b2382 Some more lock debugging support:
- LOCK_ASSERT(), which expands to KASSERT() if LOCKDEBUG.
- new simple_lock_held(), which tests if the calling CPU holds
  the specified simple lock.

From Bill Sommerfeld, modified slightly by me.
2000-08-17 04:15:43 +00:00
fvdl 4ca7344324 Fix omission in previous. 2000-08-15 17:54:59 +00:00
eeh 2ce37274f1 Fix LP64BE bug. 2000-08-15 16:26:42 +00:00
augustss ce60088d05 Define ltsleep() in the case of _EXTENT_TESTING so regressions testing
works again.
2000-08-12 23:56:50 +00:00
thorpej a91e7a7c6d Don't bother with a trampoline to start the pagedaemon and
reaper threads.
2000-08-12 22:41:53 +00:00
thorpej d66573f747 In reaper(), use ltsleep() instead of simple_unlock()/tsleep(). 2000-08-12 22:26:01 +00:00
sommerfeld 861fcc44b7 Use ltsleep(...,PNORELOCK..) instead of simple_unlock()/tsleep() 2000-08-12 16:43:00 +00:00
sommerfeld a6cdaddbe6 Use ltsleep(... PNORELOCK ) instead of simple_unlock()/tsleep() 2000-08-12 16:29:36 +00:00
sommerfeld 01233143b9 Use ltsleep instead of simple_unlock/tsleep/simple_lock 2000-08-12 16:28:30 +00:00
eeh cd557cfb3c Nother __kprintf_attribute__ to be removed. 2000-08-10 04:37:59 +00:00
tv 5b0a45ec9b Strip %b and DDB formats out of kprintf, as they are no longer supported. 2000-08-09 10:22:31 +00:00
thorpej 414765c253 In fill_kproc2(), testing p->p_stats != NULL doesn't do much good,
instead test for (p->p_flag & I_INMEM), and don't access the U-area
(via p->p_stats) if that bit is clear.  Fixes the hangs people have
seen when the system is paging and the user runs top/ps/w.
2000-08-08 23:42:07 +00:00
thorpej c70ada6428 Fix printf format error pointed out by Steve Woodford. 2000-08-08 19:55:26 +00:00
thorpej b9d2d53fb8 Add a DIAGNOSTIC or LOCKDEBUG check for held spin locks. 2000-08-07 22:10:52 +00:00
thorpej b24441d4d1 It doesn't make sense to charge simple locks to proc's, because
simple locks are held by CPUs.  Remove p_simple_locks (which was
unused anyway, really), and add a LOCKDEBUG check for held simple
locks in mi_switch().  Grow p_locks to an int to take up the space
previously used by p_simple_locks so that the proc structure doens't
change size.
2000-08-07 21:55:22 +00:00
bjh21 24f9914cb3 Second phase of changes to remove ntp_adjtime(2) from the kernel entirely if
NTP is not defined.

Also removes sysctl_ntptime, since that's unreferenced without NTP.

ntp_gettime(2) is left alone, since it doesn't raise SIGSYS, which sys_nosys()
does.
2000-08-07 18:10:20 +00:00
bjh21 a9397f5bfc Changes to syscalls.master to exclude ntp_adjtime(2) entirely if NTP is not
defined.  Changes to other files will follow in a moment.
2000-08-07 17:59:33 +00:00
thorpej 7cc27a88c0 Convert namei pathname buffer allocation to use the pool allocator. 2000-08-03 20:41:05 +00:00
thorpej 831865b30e MALLOC()/FREE() are not to be used for variable sized allocations. 2000-08-02 20:53:07 +00:00
thorpej c80a866888 MALLOC()/FREE() are not to be used for variable sized allocations. 2000-08-02 20:42:03 +00:00
thorpej 0b3ef940d0 MALLOC()/FREE() should not be used for variable sized allocations.
(A few remain here -- need to fix exec_script.c)
2000-08-02 20:36:33 +00:00
nathanw 729e93de71 principal -> principle (in a comment) 2000-08-02 20:21:36 +00:00
itojun eb0816bfcb allow admins to disable pps rate limitation, by setting "maxpps"
parameter to negative value.
2000-08-02 12:24:11 +00:00
thorpej cd32ace8bb ANSI'ify. 2000-08-01 04:57:28 +00:00
mrg a8fc5226d3 fix rev 1.44; make this cast look like:
sig = (int)(long)*(caddr_t *)data;
to *properly* dereference the passed data.  this makes signals on
ptys actually *work* on the sparc64 port.  from mycroft.


XXX: the release branch version needs this ASAP as it is probably
unstable on ILP32BE.
2000-07-28 04:31:19 +00:00
eeh 2152b574c0 Fix LP64BE bug. 2000-07-28 04:21:26 +00:00
mason fa62f74f37 Moving to a default of 64 PTYs. 2000-07-27 17:32:11 +00:00
mrg 705b50bf32 fix LP64 warnings. 2000-07-27 14:00:56 +00:00
mycroft 9daa55017e Fix the sparc_v9 hack... 2000-07-27 13:45:59 +00:00
mycroft 93a8d5ffea The ELF ABI declares that argc must fill an `argument slot'. Make it so.
For __sparc_v9__ only, do a hack to make old executables continue to work --
for now.
2000-07-26 15:42:09 +00:00