Commit Graph

1721 Commits

Author SHA1 Message Date
mycroft
808496666c Do remove sockets on so_q0, since select(2) and accept(2) do not (currently?)
return them.
1999-01-21 22:09:10 +00:00
christos
198f0a3f56 Fix initialization of resource limits for number of files and number
of processes:
- Don't initialize rlim_max to RLIM_INFINITY. The limits for those should
  be maxfiles and maxproc respectively. Programs expect getrlimit to
  return reasonable values, so that they can allocate structures (for
  example jdk does this).
- Don't initialize rlim_cur to NOFILE and MAXUPRC respectively, but to
  min(NOFILE, maxfiles) and min(MAXUPRC, maxproc) respectively.
1999-01-21 14:50:41 +00:00
mycroft
0fb75f560a Oops; previous was slightly broken. 1999-01-20 20:24:12 +00:00
mycroft
430ecf369d Do not remove sockets from the accept(2) queue on close. 1999-01-20 09:15:41 +00:00
chuck
4ef779d5e5 MNN is no longer optional 1999-01-16 21:06:44 +00:00
sommerfe
324ea43975 Fix format mismatch which only turns up when building with DEBUG 1999-01-15 22:02:59 +00:00
thorpej
54cabada51 Garbage-collect some straggling netimp stuff. 1999-01-14 01:14:01 +00:00
sommerfe
114c430bbb Allow lkm's to include symbols for use by DDB. 1999-01-13 23:06:28 +00:00
thorpej
e598335d1c Garbage-collect `mbutl'. 1999-01-09 22:10:12 +00:00
thorpej
99d93cb85e Garbage-collect union mcluster' and mclfree'. 1999-01-09 21:54:07 +00:00
lukem
0e36738ca6 add copyright 1999 1999-01-06 13:51:09 +00:00
christos
6434d50bd2 Fix 3 problems with the new signature code:
- don't set position to 0, set it to NO_ADDR (cgd)
- no need to malloc size + 1 bytes (cgd)
- fix calculation of minimum note size section.
1999-01-06 11:52:53 +00:00
erh
2f64a3eccc Protect the syscallargs header file with a define. 1999-01-03 04:25:26 +00:00
thorpej
e1315a2447 Make this compile with POOL_DIAGNOSTIC, and add a POOL_LOGSIZE option.
Defopt these.
1998-12-27 21:13:43 +00:00
christos
27e4ef39db Add support for parsing OS type note fields. 1998-12-23 15:08:37 +00:00
kleink
7d144777a3 #ifdef __STDC__ -> #if __STDC__ 1998-12-22 21:21:36 +00:00
thorpej
943f7cd0e7 In unp_internalize(), add a comment explaining why we must ALIGN() the
data after the cmsghdr when accessing internalized SCM_RIGHTS messages
(i.e. array of struct file *s).  The historic interface does not align
the externalized SCM_RIGHTS messages (i.e. array of ints).
1998-12-21 23:12:19 +00:00
thorpej
992f3b8ea7 Fix a fencepost error in unp_scan() which caused a bad pointer deref on
the SPARC platform only (ILP32 but ALIGNBYTES of 7), due to a missing
ALIGN().
1998-12-21 23:03:02 +00:00
thorpej
489d6d0e46 Reverse the stopgap change made in revision 1.29:
date: 1998/08/01 01:47:24;  author: thorpej;  state: Exp;  lines: +18 -8
Don't call the protocol drain routines if how == M_NOWAIT, which typically
means we're in interrupt context.  Since we can be called from a network
hardware interrupt, we could corrupt the protocol queues we try to drain
them at that time.

The problem has been addressed by letting the drain'able protocols use
a locking scheme to prevent queue corruption.
1998-12-18 21:40:14 +00:00
drochner
8ece294afc COMPAT_xxx option review: add missing opt_compat_linux.h
alpha -> __alpha__
1998-12-18 14:10:06 +00:00
drochner
c22ef79250 solve the COMPAT_OLDSOCK/MSG_COMPAT problem differently:
The source files which need MSG_COMPAT define COMPAT_OLDSOCK.
1998-12-18 13:18:42 +00:00
briggs
4a01b776e5 Prototype pool_print() and pool_chk() if DEBUG.
Initialize pool hash table with PR_HASHTABSIZE (i.e., 8) LIST_INIT()s
instead of one memset().
Only check for page != ph->ph_page if PR_PHINPAGE is set (in pool_chk()).
Print pool base pointer when reporting page inconsistency in pool_chk().
1998-12-16 04:28:23 +00:00
thorpej
2ef3bcfbb8 In the sosend() loop, if the residual count is > 0 before calling PRU_SEND,
set SS_MORETOCOME as a hint to the lower layer that more data is coming
on the next iteration of the loop.  Clear the flag after the PRU_SEND
call.

Suggested by Justin Walker <justin@apple.com> on the freebsd-net
mailing list.
1998-12-16 00:26:10 +00:00
christos
32b0dc0fbd Regen 1998-12-10 16:44:16 +00:00
christos
bee9dafdf5 defopt COMPAT_43 1998-12-10 15:07:01 +00:00
pk
1673c21984 Enable `device_register()' for the sparc. 1998-12-03 23:50:11 +00:00
thorpej
d90b3d3438 Add dump_kmemstats(), callable from DDB to show kmem statistics. From
Chuck Silvers via Chuck Cranor.
1998-12-02 20:35:28 +00:00
bouyer
c2912048fc Cosmectic change in a panic(), so that the panic string printed by savecore
has more meaning.
1998-12-02 10:41:01 +00:00
kenh
b519a199d6 Pass MNT_NODEVMTIME flag to lower VFS layer. 1998-12-01 23:17:25 +00:00
kleink
abd228c31c Regen: getpgid() prototype change. 1998-11-26 16:13:56 +00:00
kleink
5eb7ae9656 getpgid(2) returns a value of type pid_t. 1998-11-26 16:07:05 +00:00
mycroft
74ad07cef5 Revert the functional change in rev 1.38; permit a msg_iovlen of 0.
There are two reasons for this:
* We should be able to pass file descriptors without sending any data.
* We could send zero-length iovecs anyway (but we shouldn't have to do this).
Also, msg_iovlen is already a u_int, so delete a bunch of casts.
1998-11-26 02:25:20 +00:00
castor
813222c472 Allow pattern matching for symbol string to handle GCC's output for mips,
where strings are output as
	.ascii	"foo\000"
instead of
	.ascii	"foo\0"
1998-11-25 06:10:19 +00:00
thorpej
eb8f1afb3e Implement vdevgone(), to revoke all vnodes corresponding to the specified
type, major, (low minor...high minor).
1998-11-18 20:24:59 +00:00
thorpej
f50fecdeaf Oops, fix uninitialzed variable in last. 1998-11-18 18:40:54 +00:00
thorpej
587f931901 Be a bit more precise about how we allow no deactivation support in
config_detach().
1998-11-18 18:40:08 +00:00
thorpej
3579ddab03 If the ca_activate entry point fails, make sure to restore the old
dv_flags.
1998-11-18 18:38:07 +00:00
thorpej
ab1b371163 Implement config_detach(), mostly from Chris Demetriou, modified slightly
by Ken Hornstein and myself.

Add flags to struct device, and define one as "active".  Devices are
initially active from config_attach().  Their active state may be changed
via config_activate() and config_deactivate().

These new functions assume that the device being manipulated will recursively
perform the action on its children.

Together, config_deactivate() and config_detach() may be used to implement
interrupt-driven device detachment.  config_deactivate() will take care of
things that need to be performed at interrupt time, and config_detach()
(which must run in a valid thread context) finishes the job, which may
block.
1998-11-17 08:38:07 +00:00
perry
0c20c72cf9 (mostly) fix kernel tags support. from Frederick Bruckman in pr-6445. 1998-11-15 20:36:30 +00:00
thorpej
88bc4b9f8d Conditionally include the 4.4BSD-Lite2 compat vfs sysctl code. 1998-11-15 18:38:11 +00:00
tls
6321478a33 At securelevel >=2, don't allow new mounts, only allow change from rw to ro. 1998-11-14 06:38:54 +00:00
thorpej
1d03badef0 Implement a way to queue kernel threads for creation after init,
pagedaemon, reaper, etc.  Caller provides a callback function and
argument which will be called to create the threads.
1998-11-14 00:08:49 +00:00
thorpej
d23593a784 Make vfs_sysctl() work. 1998-11-13 20:15:32 +00:00
mycroft
1115f2e840 Er, NSIG is one *more* than the number of signals. 1998-11-13 17:23:52 +00:00
mycroft
d6ffecf67c Oops; signal numbers are 1..NSIG, not 0..NSIG-1. 1998-11-13 17:12:54 +00:00
thorpej
2f3f9379cf Add a couple more file systems to mountcompatnames[] (even though they
didn't exist in 4.3BSD or NetBSD 0.9) and always put the table into
the kernel.  It's going to be needed for VFS sysctls.
1998-11-13 04:12:35 +00:00
thorpej
920a1ace5b fork_kthread() -> kthread_create(). Set P_NOCLDWAIT on kernel threads,
which will cause any of their children to be reparented to init(8) (which
is already prepared to wait out orphaned processes).
1998-11-11 22:45:32 +00:00
thorpej
a0fac8a7bc Move fork_kthread() to a new file, kern_kthread.c, and rename it to
kthread_create().  Implement kthread_exit() (causes a thrad to exit).
Set P_NOCLDWAIT on kernel threads, which will cause any of their children
to be reparented to init(8) (which is already prepared to wait out orphaned
processes).
1998-11-11 22:44:24 +00:00
thorpej
04dc9a8878 Remove some code accidentally readded when Christos implement P_NOCLDWAIT. 1998-11-11 22:37:13 +00:00
thorpej
6956a57584 Initial version of API for creating kernel threads (likely to change somewhat
in the future):
- New function, fork_kthread(), takes entry point, argument for entry point,
  and comment for new proc.  May be called by any context, will fork the
  thread from proc0 (requires slight changes to cpu_fork()).
- cpu_set_kpc() now takes a third argument, a void *arg to pass to the
  thread entry point.  Thread entry point now takes void * instead of
  struct proc *.
- Create the pagedaemon and reaper kernel threads using fork_kthread().
1998-11-11 06:34:43 +00:00