Commit Graph

3890 Commits

Author SHA1 Message Date
yamt 68b4772ef6 redo the previous (rev.1.58; overwrite a duplicate entry rather than leave it)
differently so that entries entered during we're doing pool_get() are
checked as well.  pointed by Paul Kranenburg on source-changes@.
2004-05-07 12:05:41 +00:00
pk fba1aa540d Provide a mutex for the process limits data structure. 2004-05-06 22:20:30 +00:00
yamt 8d615f3e18 cache_enter: when we found a duplicate entry,
simply overwrite it rather than leaving a stale entry.
2004-05-06 22:02:02 +00:00
yamt f573d83f7a no need to cache_purge() in getnewvnode().
it should be already done by vclean().
2004-05-06 22:01:14 +00:00
atatat 778eadaf46 Add a printf() to the other case in sysctl_createv() where a node did
not get attached for what should be an extremely unusual case.
2004-05-06 07:06:46 +00:00
pk b2260877bf proc_reparent() must be called with proclist write lock held. Make it so. 2004-05-04 21:58:47 +00:00
pk 2fb3dac280 Since a `vmspace' always includes a `vm_map' we can re-use vm_map's
reference count lock to also protect the vmspace's reference count.
2004-05-04 21:33:40 +00:00
pk 3ec3f724be crcopy: no need to lock if we're only reading the structure's reference count. 2004-05-04 21:27:28 +00:00
pk f3f1104ed8 Change sigactsfree() to take a `struct sigacts' pointer, to fit the needs
of exit1 (its only client).
2004-05-04 21:25:47 +00:00
pk d190ac352d exit1: if !BIGLOCK, once the exiting process has been placed on the zombie
list and the proclist lock is released, we shouldn't touch the process
structure anymore, since it may be collected immediately by a waiting
parent.
2004-05-04 21:23:39 +00:00
martin efe61cce0d Fix a comment.
Approved by Andrew Brown.
2004-05-03 13:39:50 +00:00
pk 7d0afa7f41 Add mutex to protect the ucred reference counter. 2004-05-02 12:36:55 +00:00
pk 2834786715 Add a mutex for mount point I/O and wait counters (i.e. the `mnt_wcnt',
`mnt_writeopcountupper' and `mnt_writeopcountlower' members).
2004-05-02 12:21:02 +00:00
pk 5c36071518 cache_enter: concurrent lookups in the same directory may race for a
cache entry. Upon detection, free our tentative entry and return.
2004-05-02 12:00:34 +00:00
pk 1bc2407362 sys_access: use crdup(). 2004-05-02 11:13:29 +00:00
matt d1fcd75db0 Define link_sets start/stop as ptype * const [] since they are in a
readonly section.
2004-05-01 07:16:55 +00:00
matt a029630354 Commons are not allowed in header files. extern them and declare them in
the appropriate .c file.
2004-05-01 06:17:26 +00:00
matt a035030007 Use EVCNT_ATTACH_STATIC 2004-05-01 02:24:38 +00:00
enami a874187808 ANSI'fy the rest of functions. 2004-04-30 07:51:59 +00:00
simonb 01837603b0 Fix "comments within comments" problem pointed out by Geoff Wing on
source-changes.
2004-04-27 05:25:33 +00:00
kleink 3925dc263a Regen from syscalls.master 1.141: [gs]ettimeofday(2) argument declaration
change.
2004-04-27 01:15:38 +00:00
kleink 681b62c2ce POSIX-2001: Add restrict keywords to gettimeofday(2) and setitimer(2);
further deprecate struct timezone usage by changing `tzp' argument to
gettimeofday() to void *; align utimes(2) declaration by changing `times`
argument from struct timeval * to struct timeval[2].  From Murray
Armfield in PR standards/25331.

In due curse, reflect these changes in futimes(2), lutimes(2), and
settimeofday(2).
2004-04-27 01:12:44 +00:00
kleink 679cb3e5a5 Regen from rev. 1.140:
POSIX-2001: Change the `who' argument to [gs]etpriority(2) from int
to id_t.  Partially addressing PR standards/25216 from Murray Armfield.
2004-04-25 22:21:17 +00:00
kleink 3e7f30c118 POSIX-2001: Change the `who' argument to [gs]etpriority(2) from int
to id_t.  Partially addressing PR standards/25216 from Murray Armfield.
2004-04-25 22:18:08 +00:00
simonb b5d0e6bf06 Initialise (most) pools from a link set instead of explicit calls
to pool_init.  Untouched pools are ones that either in arch-specific
code, or aren't initialiased during initial system startup.

 Convert struct session, ucred and lockf to pools.
2004-04-25 16:42:40 +00:00
yamt ab195ed32f bio_doread: vp is always non-NULL here. 2004-04-25 12:41:12 +00:00
matt f86644a808 Constify the table argument to ttspeedtab. 2004-04-25 06:13:38 +00:00
atatat 3f800573aa Be consistent about using sysc_init_field() 2004-04-25 05:54:38 +00:00
atatat 990f278f7a Remove dynamic sysctl node version 0 from the tree. It seemed okay at
first, but quickly showed its shortcomings.  The version 1 node we're
now using should be good for a while.
2004-04-25 05:47:52 +00:00
simonb 9bc855a931 s/the the/the/ (only in sources that aren't regularly imported from
elsewhere).
2004-04-23 02:58:27 +00:00
yamt 05076bfbb9 chgsbsize: correct limit check and ui_sbsize calculation.
ok'ed by Christos Zoulas.
2004-04-23 02:13:29 +00:00
enami 45a4841ce9 Copy fsidx so that not to break binary compatibility of mountd etc. 2004-04-22 03:47:58 +00:00
matt e50668c7fa Constify protosw arrays. This can reduce the kernel .data section by
over 4K (if all the network protocols) are loaded.
2004-04-22 01:01:40 +00:00
matt fde909e1a1 Add prototype for uiomove_frombuf. Change uiomove_frombuf to use size_t
for its length argument (to be the same as uiomove).  Remove code that
dealt with length being negative.
2004-04-21 20:31:50 +00:00
itojun d2f1c029b9 kill sprintf, use snprintf 2004-04-21 18:40:37 +00:00
christos 6bd1d6d4db Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
2004-04-21 01:05:31 +00:00
christos ed95f3e980 Charge root for socket buffers without a socket pointer. 2004-04-19 03:44:46 +00:00
lukem fad77af2ac Add "vfs.generic.fstypes" sysctl, which contains a space separate
list of file system types currently supported by the kernel.
Previously there wasn't an easy way to determine this.
(Code shamelessly cribbed from subr_disk.c::sysctl_hw_disknames().)

Use LIST_FOREACH() appropriately.
2004-04-19 00:15:55 +00:00
matt ac57eb9d5b Constify sun_noname. 2004-04-18 22:20:32 +00:00
matt 70e1f0d3ac ANSI'fy. 2004-04-18 21:48:15 +00:00
matt 91bb3497f5 Constify the addr parameter to sbappenaddr. 2004-04-18 21:47:11 +00:00
matt 8f23e3baa1 sbreserve can be called with a NULL socket, deal with it. 2004-04-18 16:38:42 +00:00
christos f13a3d0852 PR/9347: Eric E. Fair: socket buffer pool exhaustion leads to system deadlock
and unkillable processes.
1. Introduce new SBSIZE resource limit from FreeBSD to limit socket buffer
   size resource.
2. make sokvareserve interruptible, so processes ltsleeping on it can be
   killed.
2004-04-17 15:15:29 +00:00
atatat 904ca21614 Prefer that kern.hostid is printed in hex, not as a signed decimal,
and avoid accidental sign-extension when setting it.
2004-04-16 13:25:40 +00:00
pk f663e2397e checkalias: pass LK_NOWAIT to vget() while holding the spechash spinlock. 2004-04-16 09:59:32 +00:00
provos 2e7c8ca97f check process flags, noted by Stefan Esser 2004-04-09 16:49:33 +00:00
atatat 3a5915c0ae Lots of sysctl descriptions (if someone wants to help out here, that
would be good) mostly copied from sysctl(3).  This takes care of the
top-level, most of kern.* and hw.* (modulo the ath and bge stuff), and
all of proc.*.

If you don't want the added rodata in your kernel, use "options
SYSCTL_NO_DESCR" in your kernel config.
2004-04-08 06:20:29 +00:00
atatat a70c39ff35 Clear out the struct kinfo_drivers before stuffing things into it.
Avoids leaking garbage from the stack (left over from the earlier
call to sysctl_locate()).
2004-04-08 03:35:10 +00:00
atatat 275e2ae7f3 First caller to set a description on a node sets it. This allows one
setup function to set the description, even if the node has been
instantiated elsewhere.  Or not, depending on the other that the setup
functions are called.
2004-04-06 18:52:35 +00:00
yamt 4972de4cca make cache_purge more controlable.
namely, allow following operations.
	- purge only an entry specified by a component name.
	- purge only child entries.
	- purge only parent entries.
no objections on tech-kern@.
2004-04-05 10:20:52 +00:00