tjr [Sat, 4 Jan 2003 01:11:49 +0000 (01:11 +0000)]
Rename UL_GETSIZE to UL_GETFSIZE and UL_SETSIZE to UL_SETFSIZE; these are
the names required by 1003.1-2001. The old names are retained for
source compatibility with FreeBSD 5.0 and will be removed before 6.0.
julian [Fri, 3 Jan 2003 20:41:49 +0000 (20:41 +0000)]
Make an explicit flag to indicate that a KSE has a reason to upcall,
and use that flag when there is a kse_wakeup() call. It will probably
be used with signal delivery as well eventually.
alc [Fri, 3 Jan 2003 19:19:08 +0000 (19:19 +0000)]
Refine the assertion in vm_object_clear_flag() to allow operation on the
kmem_object without Giant. In that case, assert that the kmem_object's
mutex is held.
mike [Fri, 3 Jan 2003 16:44:42 +0000 (16:44 +0000)]
Optimize errstr() by reducing the number of times it walks a string.
As a side effect, it makes the code easier to read and requires less
pointer arithmetic.
Test by: strerror regression test
Submitted by: Tim Kientzle <kientzle@acm.org>
phk [Fri, 3 Jan 2003 16:23:12 +0000 (16:23 +0000)]
Make struct swblock kernel only, to make vm/swap_pager.h userland includable.
Move struct swdevt from sys/conf.h to the more appropriate vm/swap_pager.h.
Adjust #include use in libkvm and pstat(8) to match.
sam [Fri, 3 Jan 2003 06:16:59 +0000 (06:16 +0000)]
MFS: crypto timing support; purge usercrypto sysctl (just don't config
cryptodev or kldunload cryptodev module); crypto statistcs; remove
unused alloctype field from crypto op to offset addition of the
performance time stamp
tjr [Fri, 3 Jan 2003 04:35:04 +0000 (04:35 +0000)]
Protect pidlist with a mutex to avoid a race causing a duplicate free()
when the same pipe FILE is pclosed()'d in different threads, and to avoid
corrupting the linked list when adding or removing items. The symptoms of
the linked list getting corrupted were pclose() either not finding the pipe
on the list, or the list becoming circular and pclose() looping infinitely.
gallatin [Thu, 2 Jan 2003 21:16:50 +0000 (21:16 +0000)]
o Introduce a new external mbuf type, EXT_EXTREF.
o Allow callers of m_extadd() to allocate their own reference
m_ext.ref_cnt pointer, rather than having the mbuf system allocate it
with a malloc() in the critical path. This speeds m_extadd() up, and
also simplifies locking (malloc() may need Giant).
A driver or subsystem wishing to take use its own ref counter must
initialize m_ext.ref_cnt to point to its ref counter prior to
calling m_extadd(), and it must use EXT_EXTREF as its external type.
jmallett [Thu, 2 Jan 2003 20:44:41 +0000 (20:44 +0000)]
Implement POSIX grantpt(3) functionality, and add a pt_chown utility (akin
to Solaris, it is in /usr/libexec) to perform the handing over of tty nodes
to the user being granted the pty.
Submitted by: Ryan Younce <ryany@pobox.com>
Reviewed by: security-officer@, standards@, mike@
phk [Thu, 2 Jan 2003 19:29:49 +0000 (19:29 +0000)]
Optimize the size of the work-items by letting the mapping function
decide the largest size which stays inside the zone and does not
collide with a lock sector.
jake [Thu, 2 Jan 2003 19:04:35 +0000 (19:04 +0000)]
- This damnable chip only has 1 status register for both ports, so the bit
positions for the status bits of port a and port b are different. To
avoid needing to know which channel the interrupt handler is working on,
shift the status bits for port a into the port b bit positions, and always
check the port b status bits. This fixes using port b, which I neglected
to test before.
- Remember to update the channel's tty structure from the passed in termios
in the param routine.
- Minor style.
thomas [Thu, 2 Jan 2003 10:19:43 +0000 (10:19 +0000)]
In cgetmatch(3), return -1 if a NULL or 0-length name parameter is used.
This situation most notably arises in chkprintcap, when a /etc/printcap
entry has an empty rp= attribute. In that case, cgetmatch would enter
an infinite loop if any entry in the file has multiple names.
This causes lpd to hang at boot time on 5.0-DP2 when both conditions
are met (:rp=: and multiple names -- not necessarily on the same entry).
jake [Wed, 1 Jan 2003 19:49:30 +0000 (19:49 +0000)]
Add a driver for the Zilog 8530 dual uart found in Ultra 1s and Ultra 2s.
With a 1 byte transmit fifo, 3 byte receive fifo, and wierd multiplexed I/O
designed for a Z80 cpu, this chip redefines suckage.
Based on the openbsd and netbsd drivers. Only really works as a console,
modem support is not complete since I can't test it.
alfred [Wed, 1 Jan 2003 01:56:19 +0000 (01:56 +0000)]
When compiling the kernel do not implicitly include filedesc.h from proc.h,
this was causing filedesc work to be very painful.
In order to make this work split out sigio definitions to thier own header
(sigio.h) which is included from proc.h for the time being.
alfred [Wed, 1 Jan 2003 01:01:14 +0000 (01:01 +0000)]
Since fdshare() and fdinit() only operate on filedescs, make them
take pointers to filedesc structures instead of threads. This makes
it more clear that they do not do any voodoo with the thread/proc
or anything other than the filedesc passed in or returned.
alc [Tue, 31 Dec 2002 19:38:04 +0000 (19:38 +0000)]
Implement a variant locking scheme for vm maps: Access to system maps
is now synchronized by a mutex, whereas access to user maps is still
synchronized by a lockmgr()-based lock. Why? No single type of lock,
including sx locks, meets the requirements of both types of vm map.
Sometimes we sleep while holding the lock on a user map. Thus, a
a mutex isn't appropriate. On the other hand, both lockmgr()-based
and sx locks release Giant when a thread/process blocks during
contention for a lock. This could lead to a race condition in a legacy
driver (that relies on Giant for synchronization) if it attempts to
kmem_malloc() and fails to immediately obtain the lock. Fortunately,
we never sleep while holding a system map lock.
sam [Tue, 31 Dec 2002 18:22:12 +0000 (18:22 +0000)]
o reduce the overhead of calling ppsratecheck by using ticks instead of
calling getmicrouptime (but maintain the struct timeval-based calling
convention for compatibility)
o eliminate the use of timersub in ratecheck
Note that flood ping tests indicate ppsratecheck is inaccurate (but on the
conservative side) with this revised implementation. If more accuracy is
needed we'll have to introduce an alternate interface or increase the
overhead.