Peter Wemm [Thu, 3 Oct 2002 20:30:09 +0000 (20:30 +0000)]
Move swblk_t from sys/types.h to sys/dmap.h, the only include that uses
it. It's also only used in vm/vm_swap.c, but that is also the only source
file that #include's <sys/dmap.h>. sys/dmap.h could probably be embedded
entirely in vm_swap.c since that is the only consumer of it.
Mike Barcroft [Thu, 3 Oct 2002 18:34:13 +0000 (18:34 +0000)]
Fix various style(9) bugs:
o Unusual order of #ifndef _FOO_H_, followed by license.
o Missing tabs in typedef and #define.
o Reversed comment for #endif.
Hajimu UMEMOTO [Thu, 3 Oct 2002 17:25:33 +0000 (17:25 +0000)]
Allocate 64K recieve buffer for DNS responses.
Though res_query.c also defines and refers MAXPACKET, it is not
related to ansbuf. So, I didn't touch res_query.c.
Bruce Evans [Thu, 3 Oct 2002 15:00:07 +0000 (15:00 +0000)]
Use a non-bogus type for representing the values of offsets in structs.
off_t is for offsets in files, and it is signed so it was no better
than the original type of int for avoiding warnings from broken lints,
except accidentally on machines like i386's where size_t is smaller
than off_t.
Tim J. Robbins [Thu, 3 Oct 2002 11:23:06 +0000 (11:23 +0000)]
Document towlower() and towupper() in separate manual pages instead of
trying to confusingly document both on the same page. The new manual pages
are based on tolower(3) and toupper(3) instead of the old towlower(3).
Tim J. Robbins [Thu, 3 Oct 2002 11:14:00 +0000 (11:14 +0000)]
Point out that although toupper() and tolower() really accept rune_t's
and not just unsigned char's, callers should use towupper() and towlower()
instead when working with wide characters if portability is a concern.
Don Lewis [Thu, 3 Oct 2002 06:03:26 +0000 (06:03 +0000)]
hashinit() calls MALLOC(), so release the filedesc lock in knote_attach()
before calling hashinit() and relock afterwards, taking care to see that
we don't lose a race.
Juli Mallett [Thu, 3 Oct 2002 04:32:47 +0000 (04:32 +0000)]
In lieu of a good way to prevent every possible looping in make(1), stop
there from being more than 500 processes forked by make(1), to prevent a
forkbomb from happening, in a dumb and mechanical way.
Juli Mallett [Thu, 3 Oct 2002 04:09:00 +0000 (04:09 +0000)]
XXX Add a check for p->p_limit being NULL before dereferencing it. This is
totally bogus but will hide the occurances of access of 0xbc(NULL) which
people have run into lately. This is not a proper fix, just a bandaid, until
the cause of this happening is tracked down and fixed.
Don Lewis [Thu, 3 Oct 2002 02:13:00 +0000 (02:13 +0000)]
In an SMP environment post-Giant it is no longer safe to blindly
dereference the struct sigio pointer without any locking. Change
fgetown() to take a reference to the pointer instead of a copy of the
pointer and call SIGIO_LOCK() before copying the pointer and
dereferencing it.
Mike Barcroft [Wed, 2 Oct 2002 23:25:38 +0000 (23:25 +0000)]
Fix various style(9) bugs:
o Unusual order of #ifndef _FOO_H_, followed by license.
o Missing tab in struct sched_param between type and member name.
o Space used, instead of tab, after #define.
o Reversed comment for #endif.
o Irregular comment block.
o Space used, instead of tab, to seperate return value type from
function name.
o Unordered function prototypes.
John Baldwin [Wed, 2 Oct 2002 20:31:47 +0000 (20:31 +0000)]
Rename the mutex thread and process states to use a more generic 'LOCK'
name instead. (e.g., SLOCK instead of SMTX, TD_ON_LOCK() instead of
TD_ON_MUTEX()) Eventually a turnstile abstraction will be added that
will be shared with mutexes and other types of locks. SLOCK/TDI_LOCK will
be used internally by the turnstile code and will not be specific to
mutexes. Making the change now ensures that turnstiles can be dropped
in at a later date without affecting the ABI of userland applications.
Mitsuru IWASAKI [Wed, 2 Oct 2002 17:50:38 +0000 (17:50 +0000)]
Add 2 Ids for new ServerWorks host to PCI bridge chipset.
These are still unknown name but these are working as well
as the other ServerWorks chipset.
Description strings should be corrected when the chipsets
are known.
Robert Drehmel [Wed, 2 Oct 2002 10:53:44 +0000 (10:53 +0000)]
Add the 'restrict' type qualifier to the prototypes of `sigaction',
`sigprocmask', `sigaltstack', and `sigwait' as well as to the
prototypes of the apparantly unimplemented functions `sigtimedwait'
and `sigwaitinfo'. This complies with IEEE Std 1003.1-2001.
Tim J. Robbins [Wed, 2 Oct 2002 09:57:54 +0000 (09:57 +0000)]
Use %d in a printf() format string and cast the argument to int instead of
using %td when we know that the number is between 0 and 9; mksyntax is a
build tool and needs to work on -stable.
Maxim Sobolev [Wed, 2 Oct 2002 08:42:06 +0000 (08:42 +0000)]
Further improve --fast-read mode - when reading archive from stdin ensure that
SIGTERM we are sending to decompressor when there is nothing left to do is
actually delivered to decompressor, not to the another copy of tar, which
does unblocking.
Mike Barcroft [Wed, 2 Oct 2002 07:48:13 +0000 (07:48 +0000)]
o Add typedef for size_t.
o Fix regoff_t typedef to not require <sys/types.h> as a prerequisite
(specifically use `__off_t' instead of `off_t').
o Add restrict type-qualifier to function prototypes.
Mike Barcroft [Wed, 2 Oct 2002 07:44:50 +0000 (07:44 +0000)]
Use standards visibility conditionals to conditionalize most of this
header (details on how the visibility conditionals work are available
in <sys/cdefs.h>). Use standard types instead of BSD specific ones,
so that this header compiles in the standards case (specifically this
means changing `u_int' to `unsigned int').
Scott Long [Wed, 2 Oct 2002 07:44:29 +0000 (07:44 +0000)]
Some kernel threads try to do significant work, and the default KSTACK_PAGES
doesn't give them enough stack to do much before blowing away the pcb.
This adds MI and MD code to allow the allocation of an alternate kstack
who's size can be speficied when calling kthread_create. Passing the
value 0 prevents the alternate kstack from being created. Note that the
ia64 MD code is missing for now, and PowerPC was only partially written
due to the pmap.c being incomplete there.
Though this patch does not modify anything to make use of the alternate
kstack, acpi and usb are good candidates.
Mike Barcroft [Wed, 2 Oct 2002 04:13:32 +0000 (04:13 +0000)]
o Update a visibility conditional.
o Adjust some comments in keeping with the header's local style.
o Change some typedefs to use types that don't require namespace
pollution or deprecated types.
o Move some macros to the "does not belong in this header" section.
Robert Watson [Wed, 2 Oct 2002 02:42:38 +0000 (02:42 +0000)]
Add a new MAC entry point, mac_thread_userret(td), which permits policy
modules to perform MAC-related events when a thread returns to user
space. This is required for policies that have floating process labels,
as it's not always possible to acquire the process lock at arbitrary
points in the stack during system call processing; process labels might
represent traditional authentication data, process history information,
or other data.
LOMAC will use this entry point to perform the process label update
prior to the thread returning to userspace, when plugged into the MAC
framework.
Dima Dorfman [Wed, 2 Oct 2002 00:59:14 +0000 (00:59 +0000)]
In a diskless setup, rc.d/initdiskless may overwrite parts of /etc on
a per-machine or per-cluster (with different ways of expressing what's
part of a cluster) basis. In order for this to be effective, rc.conf
has to be reread after initdiskless is finished. Implement this by
adding a hook to etc/rc which rereads rc.conf by request. This can
also be implemented by renaming initdiskless to initdiskless.sh and
sourcing rc.conf there manually, but it was decided that, that would
be uglier than a hook in etc/rc.
Dima Dorfman [Wed, 2 Oct 2002 00:09:24 +0000 (00:09 +0000)]
Remove the "special processes" section. It has rotted, and the idea
ceased to be useful when the number of "special processes" went from 3
to one per device. I considered replacing it with a "kernel threads"
section, but this seemed like the wrong place for that.
Dima Dorfman [Tue, 1 Oct 2002 23:53:51 +0000 (23:53 +0000)]
Don't claim to return the fileid which we unloaded. The kernel
doesn't do this, and it wouldn't be very useful if it did, since the
caller supplies us with that number.
PR: 41329
Submitted by: Michael Galassi <nerd@xyz.com>