Commit Graph

976 Commits

Author SHA1 Message Date
John Dyson
e5fadd05f2 Put the "free vnode isn't" check back in the right place. 1996-03-09 06:43:19 +00:00
John Dyson
0f20dc9443 Remove a now unnecessary function prototype. 1996-03-09 06:42:15 +00:00
John Dyson
836e5d1360 In order to fix some concurrency problems with the swap pager early
on in the FreeBSD development, I had made a global lock around the
rlist code.  This was bogus, and now the lock is maintained on a
per resource list basis.  This now allows the rlist code to be used for
almost any non-interrupt level application.
1996-03-03 21:11:08 +00:00
Peter Wemm
185dc76169 Deal with NetBSD byte-swapped a.out magic when checking the MID to exclude
linux binaries from the *BSD a.out loader. This is a hack, but lets me run
static NetBSD binaries.  Dynamic binaries are a much bigger problem because
the shared libraries would conflict with our native libraries, so a
/compat/netbsd alternate namespace and translation would be needed.
1996-03-03 20:06:53 +00:00
John Dyson
ef5dc8a96d Keep fork from over extending the number of processes. Since u_map is
sized exactly for maxproc, the occasional overrunning the maxproc limit
can cause problems.
1996-03-03 19:48:45 +00:00
John Dyson
c735bcf57d Fix the buffer queue problem differently. The previous fix could panic
with a buffer not on queue panic.
1996-03-03 01:04:28 +00:00
John Dyson
e188690a50 Fix a problem with the rlist code that it can have virtual pages that
don't really exist yet.  This can break pstat -s.  Jeesh, the rlist
code needs to be cleaned up...
1996-03-02 22:57:45 +00:00
Peter Wemm
d66a506616 Mega-commit for Linux emulator update.. This has been stress tested under
netscape-2.0 for Linux running all the Java stuff.  The scrollbars are now
working, at least on my machine. (whew! :-)

I'm uncomfortable with the size of this commit, but it's too
inter-dependant to easily seperate out.

The main changes:

COMPAT_LINUX is *GONE*.  Most of the code has been moved out of the i386
machine dependent section into the linux emulator itself.  The int 0x80
syscall code was almost identical to the lcall 7,0 code and a minor tweak
allows them to both be used with the same C code.  All kernels can now
just modload the lkm and it'll DTRT without having to rebuild the kernel
first.  Like IBCS2, you can statically compile it in with "options LINUX".

A pile of new syscalls implemented, including getdents(), llseek(),
readv(), writev(), msync(), personality().  The Linux-ELF libraries want
to use some of these.

linux_select() now obeys Linux semantics, ie: returns the time remaining
of the timeout value rather than leaving it the original value.

Quite a few bugs removed, including incorrect arguments being used in
syscalls..  eg:  mixups between passing the sigset as an int, vs passing
it as a pointer and doing a copyin(), missing return values, unhandled
cases, SIOC* ioctls, etc.

The build for the code has changed.  i386/conf/files now knows how
to build linux_genassym and generate linux_assym.h on the fly.

Supporting changes elsewhere in the kernel:

The user-mode signal trampoline has moved from the U area to immediately
below the top of the stack (below PS_STRINGS).  This allows the different
binary emulations to have their own signal trampoline code (which gets rid
of the hardwired syscall 103 (sigreturn on BSD, syslog on Linux)) and so
that the emulator can provide the exact "struct sigcontext *" argument to
the program's signal handlers.

The sigstack's "ss_flags" now uses SS_DISABLE and SS_ONSTACK flags, which
have the same values as the re-used SA_DISABLE and SA_ONSTACK which are
intended for sigaction only.  This enables the support of a SA_RESETHAND
flag to sigaction to implement the gross SYSV and Linux SA_ONESHOT signal
semantics where the signal handler is reset when it's triggered.

makesyscalls.sh no longer appends the struct sysentvec on the end of the
generated init_sysent.c code.  It's a lot saner to have it in a seperate
file rather than trying to update the structure inside the awk script. :-)

At exec time, the dozen bytes or so of signal trampoline code are copied
to the top of the user's stack, rather than obtaining the trampoline code
the old way by getting a clone of the parent's user area.  This allows
Linux and native binaries to freely exec each other without getting
trampolines mixed up.
1996-03-02 19:38:20 +00:00
Peter Wemm
4bd4912865 Add more options into the conf/options and i386/conf/options.i386 files
and the #include hooks so that 'make depend' is more useful.  This
covers most of the options I regularly use (but not all) and some other
easy ones.
1996-03-02 18:24:13 +00:00
Peter Wemm
bad4352830 reran makesyscalls.sh after "int len" -> "size_t len" changes. 1996-03-02 17:01:36 +00:00
Peter Wemm
3f7efdf30d Change the 'int len' args in the mmap/msync/mincore/etc class syscalls
to 'size_t' as per bde's request.
1996-03-02 16:51:25 +00:00
John Dyson
6538dda3dc 1) Fix a bug that a buffer is removed from a queue, but the
queue type is not set to QUEUE_NONE.  This appears to have
	caused a hang bug that has been lurking.
2)	Fix bugs that brelse'ing locked buffers do not "free" them, but the
	code assumes so.  This can cause hangs when LFS is used.
3)	Use malloced memory for directories when applicable.  The amount
	of malloced memory is seriously limited, but should decrease the
	amount of memory used by an average directory to 1/4 - 1/2 previous.
	This capability is fully tunable.  (Note that there is no config
	parameter, and might never be.)
4)	Bias slightly the buffer cache usage towards non-VMIO buffers.  Since
	the data in VMIO buffers is not lost when the buffer is reclaimed, this
	will help performance.  This is adjustable also.
1996-03-02 04:40:56 +00:00
John Dyson
91477adc6e Enable VMIO for non-VDIR metadata and block device. 1996-03-02 03:45:12 +00:00
John Dyson
33309c7fc0 More b_flags fixes. 1996-03-02 01:49:51 +00:00
John Dyson
f5d1e6dae6 Fix a bug that b_flags was getting unnecessarily modified by
the slice code.  The effect up to now has been insignficant, but
improved buffer allocation code will break with this problem.
1996-03-01 19:01:04 +00:00
Gary Palmer
5ccab2afa9 Add a new option: DDB_UNATTENDED. Stops machine dropping into DDB
when it panics, but leaving activation of DDB from the console
unaffected.
1996-02-28 21:42:15 +00:00
John Dyson
3eb77c8302 Fix a problem with tracking the modified bit. Eliminate the
ugly inline-asm code, and speed up the page-table-page tracking.
1996-02-25 03:02:53 +00:00
Peter Wemm
99ac3bc8da Add two sysctl variables that can be read by libutil and libkvm so that
they can adapt to simple kernel VM layout changes.
1996-02-24 14:32:53 +00:00
Poul-Henning Kamp
09bb5f7589 Make getsockopt() capable of handling more than one mbuf worth of data.
Use this to read rules out of ipfw.
Add the lkm code to ipfw.c
1996-02-24 13:38:28 +00:00
Peter Wemm
dedb7b623c Garrett pointed out that the correct place for unix system call args
is <sys/unistd.h>, with the prototype in <unistd.h>.  sys/unistd.h
is visible to the kernel compile, and is #included by unistd.h.

Also, I missed a reference to a static int in the midst of my other diffs.
1996-02-23 19:44:10 +00:00
Peter Wemm
dabee6fecc kern_descrip.c: add fdshare()/fdcopy()
kern_fork.c: add the tiny bit of code for rfork operation.
kern/sysv_*: shmfork() takes one less arg, it was never used.
sys/shm.h: drop "isvfork" arg from shmfork() prototype
sys/param.h: declare rfork args.. (this is where OpenBSD put it..)
sys/filedesc.h: protos for fdshare/fdcopy.
vm/vm_mmap.c: add minherit code, add rounding to mmap() type args where
it makes sense.
vm/*: drop unused isvfork arg.

Note: this rfork() implementation copies the address space mappings,
it does not connect the mappings together.  ie: once the two processes
have split, the pages may be shared, but the address space is not. If one
does a mmap() etc, it does not appear in the other.  This makes it not
useful for pthreads, but it is useful in it's own right for having
light-weight threads in a static shared address space.

Obtained from: Original by Ron Minnich, extended by OpenBSD
1996-02-23 18:49:25 +00:00
Peter Wemm
e89de7b5c3 Run makesyscalls to regen the tables. 1996-02-23 18:31:34 +00:00
Peter Wemm
96ac07ef3a Add hooks for rfork/minherit pair, and reset args of vfork in preperation
for adding the syscalls.
1996-02-23 18:20:44 +00:00
Peter Wemm
4f9a71f6a0 Note the syscall numbers used in BSD/OS 2.x. We dont want to
accidently use one of these ourselves as it'd make it harder to run
their binaries.
Also, remove the now-defunct #include "opt_sysvipc.h".
1996-02-23 18:03:08 +00:00
John Dyson
6e20683c9d Fix a problem that select did not work with direct writes. Make
wakeup channels more consistant also.
1996-02-22 03:33:52 +00:00
Peter Wemm
add3bbdaef Add missing prototype for pipeselwakeup (a recently added function) - gcc
bitches about it..
1996-02-17 14:47:16 +00:00
Garrett Wollman
dc915e7cfc Kill XNS.
While we're at it, fix socreate() to take a process argument.  (This
was supposed to get committed days ago...)
1996-02-13 18:16:31 +00:00
Poul-Henning Kamp
c9c37b27d1 rewrap some long lines. 1996-02-13 14:16:36 +00:00
John Dyson
f3e79aa705 Add ifdefs for non-freebsd system usage. Add missing select wakeups,
and make the select wakup code a little neater.
1996-02-11 22:09:50 +00:00
John Dyson
5af564b4f4 Add some missing requests for the read-side to wakeup the write-side. Also
add some missing wakeups by the write side to the read side.
1996-02-09 04:36:36 +00:00
Garrett Wollman
b135805469 Define a new socket option, SO_PRIVSTATE. Getting it returns the state
of the SS_PRIV flag in so_state; setting it always clears same.
1996-02-07 16:19:19 +00:00
John Dyson
26d2f00960 Apparent fix for a pipe hang problem. 1996-02-07 06:41:56 +00:00
John Dyson
f29e1bd629 More fixes from bde.
Only modify times on success.
	splhigh() around time variable usage.
	Make atomic writes more posix compliant.
	Spelling errors.
Submitted by:	bde
1996-02-05 05:50:34 +00:00
John Dyson
96cc6b1011 Kva space allocated for direct buffer wasn't quite big enough. The
system can panic easily without this patch.
1996-02-05 05:17:15 +00:00
John Dyson
dca5129987 Changed vm_fault_quick in vm_machdep.c to be global. Needed for
new pipe code.
1996-02-04 22:09:12 +00:00
John Dyson
2834ceec7c Improve the performance for pipe(2) again. Also include some
fixes for previous version of new pipes from Bruce Evans.  This
new version:

Supports more properly the semantics of select (BDE).
Supports "OLD_PIPE" correctly (kern_descrip.c, BDE).
Eliminates incorrect EPIPE returns (bash 'pipe broken' messages.)
Much faster yet, currently tuned relatively conservatively -- but now
	gives approx 50% more perf than the new pipes code did originally.
	(That was about 50% more perf than the original BSD pipe code.)

Known bugs outstanding:
	No support for async io (SIGIO).  Will be included soon.

Next to do:
	Merge support for FIFOs.

Submitted by: bde
1996-02-04 19:56:35 +00:00
Justin T. Gibbs
f6f6004c29 Properly calculate the amount of the devconf to output in SYSCTL_OUT.
The code outputs the dc then calls the device specific externalize
routines to fill in the dc_data area.  The old code assumed that dc_data
started one byte from the end of the dc, but with the compiler optimizing
alignment and padding, this isn't always the case.  Do an explicit
&(dc.dc_data) - &dc.  This fixes lsdev -c which must have been broken
for some time.
1996-01-31 18:05:19 +00:00
David Greenman
729b1e5149 Improved killproc() log message and made it and the other similar message
tolerant of p_ucred being invalid. Starting using killproc() where
appropriate.
1996-01-31 12:44:33 +00:00
John Dyson
4ab7a1a6c7 Fix another problem with the new pipe code, pointed out by Bruce Evans.
This one fixes a problem with interactions with signals.
1996-01-31 06:00:45 +00:00
John Dyson
56363b79a9 Fix some problems with return codes on the new pipe stuff. Bruce Evans
found the problems, and this commit will fix the "first batch" :-).
1996-01-31 02:05:12 +00:00
David Greenman
07bbd7f1bb Implement what I mentioned in rev 1.18: limit per-bucket allocations to
60% of physical memory or 60% of malloc area size, whichever is smaller.
1996-01-29 11:12:37 +00:00
David Greenman
54e7152c15 Fixed two bugs in the calculation of the malloc area (kmem_map) size:
1) The calculation didn't account for NMBCLUSTERS, so if a large number of
   clusters was specified, it would leave little or no space for kernel
   malloc.
2) It was bogusly restricted to v_page_count. This doesn't take into
   account the sparseness of the malloc area and would have caused
   problems on machines with small amounts of memory. It should probably
   instead be changed to set the malloc limit to be constrained by
   the amount of memory, but I didn't do this.
1996-01-29 09:58:34 +00:00
Justin T. Gibbs
65ed8cbd4e Kernel printf now returns int. 1996-01-29 03:18:05 +00:00
John Dyson
4fd00d508b Fixed an uninitialized variable (argument to vm_map_find) -- problem
that DG detected, and promptly found a fix.
Submitted by:	davidg
1996-01-29 02:57:33 +00:00
John Dyson
f982721359 Enable the new fast pipe code. The old pipes can be used with the
"OLD_PIPE" config option.
1996-01-28 23:41:40 +00:00
John Dyson
10c5615c1d Added new files to support the new fast pipes. After the follow-on
commits, pipe performance should increase significantly.  The pipe(2)
system call is currently supported, while fifofs will be added later.
1996-01-28 23:38:26 +00:00
John Dyson
44196d615f An earlier modification had decreased CPU usage, but also
decreased performance.  This essentially undoes that change.
1996-01-28 18:25:54 +00:00
Bruce Evans
80f9be1460 Fixed dangling pointer bugs in DIOCSDINFO.
Enabled DEVFS support.  It doesn't work while devfs is mounted
(add_devfs_devsw() doesn't work then), but seems to be safe.
1996-01-28 08:15:44 +00:00
Bruce Evans
af4cb3a1c4 [Oops, forgot to commit this together with things that depend on it.]
First attempt at creating devfs entries for sliced devices.  Doesn't
quite work yet, so the heart of it is disabled.

Added bdev and cdev args to dsopen().

Create devfs entries in dsopen() and (unsuccessfully) attempt to make
them go away at the right times.  DEVFS is #undefed at the start so
that this shouldn't cause problems.
1996-01-27 09:34:21 +00:00
Poul-Henning Kamp
16cf781eed Fix a bug I made in the devfs. 1996-01-26 12:42:39 +00:00
Poul-Henning Kamp
e8cbe8fa47 Avoid local sprintfs and other printf'isms. 1996-01-25 07:21:50 +00:00
Bruce Evans
bf124e256b Restored newline at the end of panic messages. 1996-01-25 00:17:22 +00:00
Poul-Henning Kamp
120f078334 Remove %r hack, we have vprintf() now.
Add %D for "dumping" data.  Good for ethernet/MAC addresses and such.
Handle 1 < radix < 37.
1996-01-24 20:56:20 +00:00
Peter Wemm
b0281cef04 Major fixes for ptrace()...
PT_ATTACH/PT_DETACH implemented now and fully operational.
PT_{GET|SET}{REGS|FPREFS} implemented now, using code shared with procfs
PT_{READ|WRITE}_{I|D} now uses code shared with procfs
ptrace opcodes now fully permission checked, including ownerships.
doing an operation to the u-area on a swapped process should no longer
panic.
running gdb as root works for me now, where it didn't before.
general cleanup..

Note, that this has some tightening of permissions/access checks etc.
Some of these may be going too far..  In particular, the "owner" of the
traced process is enforced.  The process that created or attached to
the traced process is now the only one that can "do" things to it.
1996-01-24 18:29:00 +00:00
Poul-Henning Kamp
b4b2f81ef3 bounds check the radix, just in case. 1996-01-22 13:21:33 +00:00
John Dyson
f69170e601 Previous commit to vfs_cluster accidentally disabled read-ahead. Problem
fixed by initializing "alreadyincore" to 0 in the case of
sequential reads.
1996-01-20 23:24:16 +00:00
Bruce Evans
9f29a57754 Removed stale #includes of "opt_sysvipc.h". 1996-01-20 21:36:31 +00:00
Poul-Henning Kamp
ed71c34200 Imake %.*s really work. :-( 1996-01-19 21:05:52 +00:00
Poul-Henning Kamp
fe96d47d8e Make result of sprintf zero terminated. Fix %r for sprintf case. 1996-01-19 11:38:18 +00:00
John Dyson
bd7e5f992e Eliminated many redundant vm_map_lookup operations for vm_mmap.
Speed up for vfs_bio -- addition of a routine bqrelse to greatly diminish
	overhead for merged cache.
Efficiency improvement for vfs_cluster.  It used to do alot of redundant
	calls to cluster_rbuild.
Correct the ordering for vrele of .text and release of credentials.
Use the selective tlb update for 486/586/P6.
Numerous fixes to the size of objects allocated for files.  Additionally,
	fixes in the various pagers.
Fixes for proper positioning of vnode_pager_setsize in msdosfs and ext2fs.
Fixes in the swap pager for exhausted resources.  The pageout code
	will not as readily thrash.
Change the page queue flags (PG_ACTIVE, PG_INACTIVE, PG_FREE, PG_CACHE) into
	page queue indices (PQ_ACTIVE, PQ_INACTIVE, PQ_FREE, PQ_CACHE),
	thereby improving efficiency of several routines.
Eliminate even more unnecessary vm_page_protect operations.
Significantly speed up process forks.
Make vm_object_page_clean more efficient, thereby eliminating the pause
	that happens every 30seconds.
Make sequential clustered writes B_ASYNC instead of B_DELWRI even in the
	case of filesystems mounted async.
Fix a panic with busy pages when write clustering is done for non-VMIO
	buffers.
1996-01-19 04:00:31 +00:00
Poul-Henning Kamp
4f20e4b143 Make %.*s work. 1996-01-18 10:23:02 +00:00
Poul-Henning Kamp
ab29fc2265 Remove local TRUE & FALSE definitions.
Fall into debugger on negative blk#.
1996-01-16 18:11:24 +00:00
Poul-Henning Kamp
505ae68ea8 Fix a printf, well, actually break it, that is...
We don't have the ability to print 64bit things yet...
1996-01-16 18:10:19 +00:00
Poul-Henning Kamp
4830092a53 Add support for %.{int|*}s 1996-01-16 18:08:57 +00:00
David Greenman
c128d2157b Make sure the mountpoint is marked busy before doing operations on it.
This fixes a panic that freefall suffered last night.

Obtained partially from 4.4-lite2, but minus the new bug that it introduced
1996-01-16 13:07:14 +00:00
Poul-Henning Kamp
791d77e0dd Get rid of two and a half printf in the kernel.
Add more features to the one remaining to handle the job:
	+	signed quantity.
	#	alternate format
	-	left padding
	*	read width as next arg.
	n	numeric in (argument specified) default radix.

Fix the DDB debugger to use these.
Use vprintf in debug routine in pcvt.

The warnings from gcc may become more wrong and  intolerable because
of this.

Warning:  I have not checked the entire source for unsupported or
changed constructs, but generally belive that there are only a few.

Suggested by: bde
1996-01-15 22:41:03 +00:00
Poul-Henning Kamp
99cb299316 Add an option NFS_NOSERVER which saves 100K in the install kernel (or
any other kernel that uses it).  Use with option NFS.
1996-01-13 23:27:58 +00:00
Peter Wemm
81090119af (gulp!) reran makesyscalls..
sysv_ipc.c: add stub functions that either simply return (for the hooks
in kern_fork/kern_exit) or log() a messgae and call enosys() (for the
syscalls).  sysv_ipc.c will become "standard" in conf/files and has
#ifs for all the permutations.
1996-01-08 04:30:48 +00:00
Peter Wemm
e7ae3bf08d Remove the #ifdef SYSVSHM etc. Always call the functions, some stubs
are about to go in.  This is to fix the problem with the ibcs2 and linux
lkm's not being able to call the sysv ipc functions unless the build is
modified.
1996-01-08 04:13:25 +00:00
Poul-Henning Kamp
b20235a04a It's bad if the blockno is negative. 1996-01-07 22:39:06 +00:00
David Greenman
7548aeb5c5 Print out the queue index if it's found to be inconsistent. 1996-01-06 23:58:03 +00:00
David Greenman
2199f986f1 Rework vm_hold_{load,free}_pages to calculate an index once and use that.
At the same time, be sure to page-truncate bp->b_data so that the result
of the calculation isn't negative.
1996-01-06 23:23:02 +00:00
Garrett Wollman
4b29bc4f8a Eliminate the dramatic TCP performance decrease observed for writes in
the range [210:260] by sweeping the problem under the rug.  This change
has the following effects:

1) A new MIB variable in the kern branch is defined to allow modification
of the socket buffer layer's ``wastage factor'' (which determines how
much unused-but-allocated space in mbufs and mbuf clusters is allowed
in a socket buffer).

2) The default value of the wastage factor is changed from 2 to 8.
The original value was chosen when MINCLSIZE was 7*MLEN (!), and is not
appropriate for an environment where MINCLSIZE is much less.

The real solution to this problem is to scrap both mbufs and sockbufs
and completely redesign the buffering mechanism used at both levels.
1996-01-05 21:41:54 +00:00
Garrett Wollman
8890984dc9 Convert BOUNCE_BUFFERS and BOUNCEPAGES to new option scheme. 1996-01-05 20:12:53 +00:00
Garrett Wollman
692910e615 convert FDESC, KERNFS, NULLFS, PORTAL, UMAPFS, and UNION to the new
style of options.
1996-01-05 17:46:14 +00:00
Garrett Wollman
511b67b70c Somehow managed to miss these four files when converting the SYSV IPC
options over to the new style.
1996-01-05 16:38:03 +00:00
Garrett Wollman
0e41ee3037 Convert DDB to new-style option. 1996-01-04 21:13:23 +00:00
Garrett Wollman
50c73f3620 Convert SYSV IPC to new-style options. (I hope I got everything...)
The LKMs will need an extra file, to come later.
1996-01-04 20:29:06 +00:00
David Greenman
a5782ecc36 Fixed minor struct cred leak. Discovered while looking for the opposite
condition - too many frees, which has yet to be found.

Reviewed by:	dyson
1996-01-04 06:09:00 +00:00
Garrett Wollman
db6a20e23e Converted two options over to the new scheme: USER_LDT and KTRACE. 1996-01-03 21:42:35 +00:00
David Greenman
864ef7d17e Moved the #ifdef DIAGNOSTIC in vrele() so that the check for negative
v_usecount is always performed and only the call to vprint is conditional.
1996-01-02 18:13:20 +00:00
Peter Wemm
a1d2540fa0 Fix the reversed source and dest args to bcopy() in the kernel space
sysctl handler (ouch!)

Add a "const" qualifier to the source of the copyin() and copyout()
functions - the other const warning in kern_sysctl.c was silenced when
copyout was declared as having a const source.. (which it is)
1996-01-01 17:05:07 +00:00
Peter Wemm
8735cebc64 fill in kinfo_eproc.e_login - otherwise a sysctl to read the eprocs wont
get the login names, and "ps -ax -O login" will return an empty column
under the login name.
1996-01-01 17:01:03 +00:00
Peter Wemm
780dc5a8b9 Only #include <sys/shm.h> if SYSVSHM (for shmexit() prototype)
Add missing #include <sys/sem.h> if SYSVSEM  (for semexit() prototype)
1996-01-01 12:23:39 +00:00
Peter Wemm
6ee78bf046 Make pipe() return a set of bidirectional pipe fd's rather than one-way only
just like on SVR4.

This has no effect on any current programs in our source, but makes
the use of SVR4 code a little easier.  There is no code or implementation
cost in the kernel.. This two-line change merely sets the modes on the ends
of the pipes to be bidirectional.  There are no other changes.
1996-01-01 10:28:21 +00:00
Peter Wemm
a5b996a7ec recording cvs-1.6 file death 1995-12-30 19:02:48 +00:00
Bruce Evans
912e603778 Implemented non-statistical kernel profiling. This is based on
looking at a high resolution clock for each of the following events:
function call, function return, interrupt entry, interrupt exit,
and interesting branches.  The differences between the times of
these events are added at appropriate places in a ordinary histogram
(as if very fast statistical profiling sampled the pc at those
places) so that ordinary gprof can be used to analyze the times.

gmon.h:
Histogram counters need to be 4 bytes for microsecond resolutions.
They will need to be larger for the 586 clock.
The comments were vax-centric and wrong even on vaxes.  Does anyone
disagree?

gprof4.c:
The standard gprof should support counters of all integral sizes
and the size of the counter should be in the gmon header.  This
hack will do until then.  (Use gprof4 -u to examine the results
of non-statistical profiling.)

config/*:
Non-statistical profiling is configured with `config -pp'.
`config -p' still gives ordinary profiling.

kgmon/*:
Non-statistical profiling is enabled with `kgmon -B'.  `kgmon -b'
still enables ordinary profiling (and distables non-statistical
profiling) if non-statistical profiling is configured.
1995-12-29 15:30:05 +00:00
Mark Murray
aba89c509d 1) ifdef out some unused functions (for now)
2) improve 586 support
3) add 686 support
4) clean up comments etc
Submitted by:	bde
1995-12-29 08:04:32 +00:00
Mark Murray
179c10f92d 1) Add #include <machine/cpu.h> to catch some 586 #defines
2) swap the 2 arguments to outb (kato)
Pointed out by: Kato Takenori <kato@eclogite.eps.nagoya-u.ac.jp>
1995-12-28 17:09:14 +00:00
Jordan K. Hubbard
737af07cff Gack - if you're going to call semexit() from elsewhere, it shouldn't
be static.. :-)
1995-12-28 01:31:38 +00:00
Joerg Wunsch
a353d785a9 Call semexit() from exit(), in order to process `undo vectors'.
This function has actually never been called.
1995-12-27 15:25:30 +00:00
Mark Murray
0738b16169 random_machdep.c: New version, also includes revectored interrupts, rather
than hooking permanently.
vector.s:       : Remove the interrupt hook. This is done dynamically, now.
1995-12-27 11:22:05 +00:00
Joerg Wunsch
0209e040ba I report a problem about shmget(). (I'm using FreeBSD-2.1.0R)
int shmget(key_t key, int size, int shmflg);

If the 'key' has already existed in the system and set 'shmflg'
as '(IPC_CREAT|IPC_EXC)', then shmget() must return the error 'EEXIST'.

Submitted by:	m_tanaka@pa.yokogawa.co.jp (Mihoko Tanaka)
1995-12-26 16:03:32 +00:00
Bruce Evans
337e9f0bd2 Renamed isa/random.c to isa/random_machdep.c to avoid a conflict with
libkern/random.c.
1995-12-26 12:50:24 +00:00
Bruce Evans
037d027c92 Unstaticized addupc_task(). It is supposed to be called from trap().
See the comments for addupc_intr() and the NetBSD implementation.
We use dummy versions of fuswintr() and susiwintr(), so addupc_intr()
always pushes the work to trap() (this is inefficient), and trap()
calls the special i386 function addupc() instead of addupc_task().
addupc() is more efficient than addupc_intr(), so some of the lost
efficiency is recovered.  However, addupc() may be broken on plain
i386's since it doesn't check for write permission like copyout().
1995-12-26 01:21:39 +00:00
Bruce Evans
80c07b6665 Finished staticizing of timevalfix(). 1995-12-26 01:07:42 +00:00
Bruce Evans
35e8beae8c Fixed bugs and finished staticization for things inside `#ifdef DEBUG'.
Moved most of these things inside `#ifdef notyet_block_reallocation_enabled'
where they may never be used again.
1995-12-22 16:06:46 +00:00
Bruce Evans
95ff47b69f Fixed permissions of /dev/tty. 1995-12-22 15:57:31 +00:00
Poul-Henning Kamp
79c0c4b77f kern_conf.c: remove a now unused variable.
vfs_cache.c: Fix a very rare probelm in the vnode-cache.
Submitted by:	Terry Lambert <terry@lambert.org>
1995-12-22 15:56:35 +00:00
Bruce Evans
6bbc7a382c Fixed pty names. The control and slave names were back to front.
Fixed pty permissions.
1995-12-22 15:53:53 +00:00
Poul-Henning Kamp
df85d797f7 Remove crufty "pg" function. 1995-12-22 13:09:39 +00:00
Julian Elischer
1dfcbb0ce3 i386/i386/conf.c is no longer needed.. remove it from files.i386
redistribute a few last routines to beter places and shoot the file

I haven't act actually 'deleted' the file yet togive people time
to
have done a config.. I.e. they are likely to have done one in a week or so
so I'll remove it then..
 it's now empty.
makes the question of a USL copyright rather moot.
1995-12-21 20:09:46 +00:00
David Greenman
c96819306b Corrected a typo in a comment. 1995-12-19 14:47:41 +00:00
David Greenman
2838c9682a Implemented a (sorely needed for years) double fault handler to catch stack
overflows.
It sure would be nice if there was an unmapped page between the PCB and
the stack (and that the size of the stack was configurable!). With the
way things are now, the PCB will get clobbered before the double fault
handler gets control, making somewhat of a mess of things. Despite this,
it is still fairly easy to poke around in the overflowed stack to figure
out the cause.
1995-12-19 14:30:50 +00:00
Poul-Henning Kamp
27a0b398a7 Staticize.
Unstaticize a function in scsi/scsi_base that was used, with an undocumented
option.
My last count on the LINT kernel shows:
Total symbols:  3647
unref symbols:   463
undef symbols:     4
1 ref symbols:  1751
2 ref symbols:   485
Approaching the pain threshold now.
1995-12-17 21:23:44 +00:00
Poul-Henning Kamp
3ac9f819ae Add an obscure feature, needed for debugging. 1995-12-17 21:11:22 +00:00
Bruce Evans
63c8f42175 Updated to match 1TB filesize changes. Some pindexes were still offsets
and weren't converted.  ptrace() was broken.
1995-12-17 06:59:36 +00:00
Bruce Evans
6a1441a3e6 Oops, the last commit missed one change from 200 to OBUFSIZ + 100. 1995-12-16 21:45:02 +00:00
Bruce Evans
5add07e53c Removed dead debugging code. 1995-12-16 21:43:47 +00:00
Bruce Evans
b62d102cbb Uniformized pr_ctlinput protosw functions. The third arg is now `void
*' instead of caddr_t and it isn't optional (it never was).  Most of the
netipx (and netns) pr_ctlinput functions abuse the second arg instead of
using the third arg but fixing this is beyond the scope of this round
of changes.
1995-12-16 02:14:44 +00:00
Bruce Evans
716962965e Removed unused function lkmenodev(). 1995-12-16 00:01:40 +00:00
Peter Wemm
b5d5c0c934 Update sysv_*.c to get their argument definitions from sysproto.h 1995-12-15 05:00:31 +00:00
Peter Wemm
295ab04920 Regenerated from syscalls.master... 1995-12-15 04:46:32 +00:00
Peter Wemm
bf4f39849b Add the direct sysv shm/sem/msg system calls, in the same way as NetBSD.
This costs very little, we gain prototypes for the calls from the linux
emulator, and this is one less thing in the way of NetBSD binary support.
1995-12-15 04:36:01 +00:00
Peter Wemm
364a760eb9 Oops. I forgot the change to this file for supporting static configuration
of the linux emulator.
1995-12-15 02:57:40 +00:00
Bruce Evans
247b53374b Changed the maximum output queue count from (TTMAXHIWAT + 200) to
(TTMAXHIWAT + OBUFSIZ + 100) in case someone changes OBUFSIZ.  200
was to allow 100 above high water for ordinary writes and another
100 for kernel printfs.

Increased the reserved output queue count from 512 to the maximum
output queue count.  This prevents exhaustion of clists and increases
the output throughput for 8 cy lines by almost a factor of 2 (on
a system where there aren't many other open ttys so clists become
exhausted after about 4 active lines (or earlier if TTMAXHIWAT is
increased :-]).

ttwrite() behaves very badly when clists are exhausted:
(1) it sleeps on lbolt instead of on TSA_OLOWAT(tp).
    This could be fixed adequately by sleeping on TSA_OLOWAT(tp).
    The nonzero reserved count guaratees that space will become
    available independent of other ttys, and a reserved count
    of 512 is barely enough for efficiency.
(2) it drops output if space runs out in the middle of special
    output processing.  This is too hard to fix without hardening
    the reserved count.  The watermark processing guarantees that
    space doesn't run out only if the advertised space is guaranteed.

Increasing the reserved output queue count defeats the point of
dynamic allocation of clists.  Previously, about 2K of memory per
tty was reserved (the raw queue was already reserved).  Now, about
3.5K is reserved.  Reserving everything would take a whole 0.5K
more.
1995-12-15 02:18:06 +00:00
Bruce Evans
a59db23b94 Disabled the sleep in ttyflush(). It can't work in general because
ttyflush() might be called from an interrupt handler.  This fixes
panics in IXOFF mode at the cost of more failures to send the START
character to exit from IXOFF mode.
1995-12-15 01:01:00 +00:00
Bruce Evans
d14122ea44 Fixed staticization of DDB functions. 1995-12-14 23:01:51 +00:00
Bruce Evans
47daf5d5d6 Nuked ambiguous sleep message strings:
old:				new:
	netcls[] = "netcls"		"soclos"
	netcon[] = "netcon"		"accept", "connec"
	netio[] = "netio"		"sblock", "sbwait"
1995-12-14 22:51:13 +00:00
Bruce Evans
947803d7d8 Restored unused function ttrstrt(). It would be used if the low level
drivers supported inter-character delays.
1995-12-14 22:32:52 +00:00
Peter Wemm
b1529bda75 GENERIC/LINT: Remove redundant quoting on some option lines.
LINT: add a couple of new/missing/undocumented options
files.i386: add linux code so that you can compile a kernel with static
linux emulation ("options LINUX")
i386/*: use #if defined(COMPAT_LINUX) || defined(LINUX) to enable static
support of linux emulation (just like "IBCS2" makes ibcs2 static)

The main thing this is going to make obvious, is that the LINUX code
(when compiled from LINT) has a lot of warnings, some of which dont look
too pleasant..
1995-12-14 14:35:36 +00:00
Poul-Henning Kamp
f708ef1b9e Another mega commit to staticize things. 1995-12-14 09:55:16 +00:00
Poul-Henning Kamp
87b6de2b76 A Major staticize sweep. Generates a couple of warnings that I'll deal
with later.
A number of unused vars removed.
A number of unused procs removed or #ifdefed.
1995-12-14 08:32:45 +00:00
Poul-Henning Kamp
5e46340891 Make math_emulators LKMable. 1995-12-14 08:21:33 +00:00
Julian Elischer
6ba9ebce28 devsw tables are now arrays of POINTERS to struct [cb]devsw
seems to work hre just fine though  I can't check every file
that changed due to limmited h/w, however I've checked enught to be petty
happy withe hte code..

WARNING... struct lkm[mumble] has changed
so it might be an idea to recompile any lkm related programs
1995-12-13 15:13:57 +00:00
John Dyson
1cdb60485c Fix a problem that was caused by new (partial) support for merged cache
metadata and VBLK type devices.  The code is currently mostly disabled,
and a work-around has been added to disabled attempted clustered writes
for VBLK type device buffers.  Clustered write of meta-data is currently
a work in progress.
1995-12-13 03:47:01 +00:00
John Dyson
beb2f78fb0 This should have fixed some conditions that could cause the
"getblk" hang.  The B_WANTED flag was being cleared gratuitously,
also the optimization of gbincore for ignoring the B_INVAL flag was
incorrect.  There is no place in the code where buffers are on the
hash list that are B_INVAL and not B_BUSY.
1995-12-12 04:18:10 +00:00
John Dyson
a316d390bd Changes to support 1Tb filesizes. Pages are now named by an
(object,index) pair instead of (object,offset) pair.
1995-12-11 04:58:34 +00:00
Bruce Evans
c73feca0b7 Removed new alias d_size_t for d_psize_t.
Removed old aliases d_rdwr_t and d_ttycv_t for d_read_t/d_write_t and
d_devtotty_t.

Sorted declarations of switch functions into switch order.

Removed duplicated comments and declarations of nonexistent switch
functions.
1995-12-10 15:55:34 +00:00
Poul-Henning Kamp
154c04e573 Last commit this round: Staticize.
we are now down to about 1146 symbols being global, of which
I estimate that about 100 are validly so.
1995-12-10 13:45:30 +00:00
Poul-Henning Kamp
7dfe504fe2 Remove various unused symbols and procedures. 1995-12-09 20:40:43 +00:00
Poul-Henning Kamp
162a9e8732 Move sysctl machdep.consdev to cons.c 1995-12-09 20:39:47 +00:00
Peter Wemm
1ed012f969 Reorganise ps_strings in order to gain BSD/OS 2.0 binary compatability.
This is now in line with NetBSD as well..

Note that once this series of commits is finished, you must recompile
libkvm, then ps and maybe 'w'.  If you are running the recently imported
sendmail-8.7, you should recompile that too (src/conf.c at least).
1995-12-09 04:29:11 +00:00
Poul-Henning Kamp
d2f265fab8 Julian forgot to make the *devsw structures static. 1995-12-08 23:23:00 +00:00
Julian Elischer
87f6c6625d Pass 3 of the great devsw changes
most devsw referenced functions are now static, as they are
in the same file as their devsw structure. I've also added DEVFS
support for nearly every device in the system, however
many of the devices have 'incorrect' names under DEVFS
because I couldn't quickly work out the correct naming conventions.
(but devfs won't be coming on line for a month or so anyhow so that doesn't
matter)

If you "OWN" a device which would normally have an entry in /dev
then search for the devfs_add_devsw() entries and munge to make them right..
check out similar devices to see what I might have done in them in you
can't see what's going on..
for a laugh compare conf.c conf.h defore and after... :)
I have not doen DEVFS entries for any DISKSLICE devices yet as that will be
a much more complicated job.. (pass 5 :)

pass 4 will be to make the devsw tables of type (cdevsw * )
rather than (cdevsw)
seems to work here..
complaints to the usual places.. :)
1995-12-08 11:19:42 +00:00
David Greenman
efeaf95a41 Untangled the vm.h include file spaghetti. 1995-12-07 12:48:31 +00:00
Bruce Evans
2baeef32b6 Removed unnecessary #includes of vm stuff. Most of them were once
prerequisites for <sys/sysctl.h>.

subr_prof.c:
Also replaced #include of <sys/user.h> by #include of <sys/resourcevar.h>.
1995-12-06 23:37:44 +00:00
Bruce Evans
40560c4471 Don't #include vm stuff in vnode_if.[ch]. Enough vm stuff (a
single typedef) is now declared in <sys/types.h>.

This is the first of 4 commits that will remove some excessive
includes of vm*.h and user.h.  The total speed improvement isn't
as large as I first thought.  `make depend; make' for LINT only
improved from 2180 seconds to 2108 seconds user time.
1995-12-06 23:33:39 +00:00
Poul-Henning Kamp
65d0bc1387 A couple of minor tweaks to the sysctl stuff. 1995-12-06 13:27:39 +00:00
Bruce Evans
4cb03b1b55 Include <vm/vm.h> or <vm/vm_page.h> explicitly to avoid breaking when
vnode_if.h doesn't include vm stuff.
1995-12-05 21:51:45 +00:00
Poul-Henning Kamp
946bb7a268 A major sweep over the sysctl stuff.
Move a lot of variables home to their own code (In good time before xmas :-)

Introduce the string descrition of format.

Add a couple more functions to poke into these marvels, while I try to
decide what the correct interface should look like.

Next is adding vars on the fly, and sysctl looking at them too.

Removed a tine bit of defunct and #ifdefed notused code in swapgeneric.
1995-12-04 16:48:58 +00:00
Jordan K. Hubbard
f205c88775 Close PR: kern/865
Submitted by:	Juergen Lock <nox@jelal.hb.north.de>
1995-12-04 02:26:53 +00:00
Bruce Evans
fb98064487 Oops, the last commit left a redundant declaration. 1995-12-03 18:00:35 +00:00
Bruce Evans
98d938220c Completed function declarations and/or added prototypes. 1995-12-02 18:58:56 +00:00
Bruce Evans
d841aaa740 Finished (?) cleaning up sysinit stuff. 1995-12-02 17:11:20 +00:00
Bruce Evans
7ee050b70c Staticized.
Added prototypes.
1995-12-02 16:32:03 +00:00
Julian Elischer
ee0bc7c399 I fixed this before than committed it on my machine and not on freefall.
(window confusion)
1995-12-02 13:08:20 +00:00
Julian Elischer
9fd7da5843 Submitted by: Heikki Suonsivu
Made the pty devices creates in devfs match the present MAKEDEV naming
1995-12-02 07:30:19 +00:00
Julian Elischer
e7a301c64f Submitted by: jb@cimlogic.com.au (John Birrell)
Obtained from:  NetBSD as well (He submitted it there too)

make sure that teh shm region is beyond the sum of the text and data segs
as it was big progs could collide with the shm region.
1995-11-30 07:58:50 +00:00
Julian Elischer
de1676f933 A pair of really tiny patches that not only allow it all to compile
but also IT ACTUALLY WORKS!
FreeBSD with options  JREMOD now runs with no entries in the devsw tables
prior to the devices puting their own entries there..

Thanks to bde and terry for thoughts and comments.
next stop 'Real' devfs support in devices.
1995-11-30 05:59:09 +00:00
Garrett Wollman
8e050b2e86 Disallow LKM manipulations when in seure mode.
Noticed by: bde
1995-11-29 17:45:59 +00:00
Julian Elischer
7198bf4725 If you're going to mechanically replicate something in 50 files
it's best to not have a (compiles cleanly) typo in it! (sigh)
1995-11-29 14:41:20 +00:00
Julian Elischer
adb2dc299a #ifdef out nearly the entire file of conf.c when JREMOD is defined
add a few safety checks in specfs because
now it's possible to get entries in [cd]devsw[] which are ALL NULL
so it's better to discover this BEFORE jumping into the d_open() entry..

more check to come later.. this getsthe code to the stage where I
can start testing it, even if I haven't caught every little error case...
I guess I'll find them quick enough..
1995-11-29 12:38:49 +00:00
Poul-Henning Kamp
2d0b1d708c A test was backwards.
Noticed by:	Cheng, Hsiao-Yang <sycheng@cis.ufl.edu>
1995-11-29 11:28:00 +00:00
Julian Elischer
53ac6efbd8 OK, that's it..
That's EVERY SINGLE driver that has an entry in conf.c..
my next trick will be to define cdevsw[] and bdevsw[]
as empty arrays and remove all those DAMNED defines as well..

Each of these drivers has a SYSINIT linker set entry
that comes in very early.. and asks teh driver to add it's own
entry to the two devsw[] tables.

some slight reworking of the commits from yesterday (added the SYSINIT
stuff and some usually wrong but token DEVFS entries to all these
devices.

BTW does anyone know where the 'ata' entries in conf.c actually reside?
seems we don't actually have a 'ataopen() etc...

If you want to add a new device in conf.c
please  make sure I know
so I can keep it up to date too..

as before, this is all dependent on #if defined(JREMOD)
(and #ifdef DEVFS in parts)
1995-11-29 10:49:16 +00:00
Bruce Evans
43cbfcb357 Removed all #includes of the unused file <sys/device.h>. 1995-11-28 07:29:59 +00:00
Peter Wemm
6884d2aae7 Implement read/write to kernel space - I use this for a self-loading/
self-decompressing ram disk that I'm fiddling with..

(Note, this depends on the various syscalls having correctly set uio_segflag
 before calling physio - I've checked and they look correct.)
1995-11-28 02:40:38 +00:00
John Dyson
dc4a0cee58 Update the wd.c driver to use the new TAILQ scheme for device
buffer queue.  Also, create a new subroutine 'tqdisksort' that
is an improved version of the original disksort that also uses
TAILQs.
1995-11-23 07:24:41 +00:00
Poul-Henning Kamp
4b2af45f4b Mega commit for sysctl.
Convert the remaining sysctl stuff to the new way of doing things.
the devconf stuff is the reason for the large number of files.
Cleaned up some compiler warnings while I were there.
1995-11-20 12:42:39 +00:00
Poul-Henning Kamp
48cee07655 Put cbstat() under #ifdef DDB 1995-11-20 12:15:45 +00:00
Poul-Henning Kamp
78535df223 Remove unused var. 1995-11-20 12:14:40 +00:00
Poul-Henning Kamp
a5d3a44198 Close the "unused" warning for things in linker-sets.
This will also allow us to catch typos in the setname by running a
nm through a grep.
1995-11-20 12:08:08 +00:00
John Dyson
fec16d9994 Yet another small block FS bug fix. 1995-11-20 04:53:45 +00:00
John Dyson
10c8eaff67 Fix more clustering bugs for FSes with block sizes < PAGE_SIZE. 1995-11-20 03:55:48 +00:00
John Dyson
fb9ca17e1e Changed an incorrect splhigh to splbio. 1995-11-19 20:42:25 +00:00
John Dyson
5fe17eeb8a General fixes to the vfs clustring code:
1) Make cluster buffer list be a non-malloced chain.  This eliminates
yet another 'evil' M_WAITOK and generally cleans up the code.
2) Fix write clustering for ext2fs.  It was just broken.  Also, ffs
clustering had an efficiency problem that more bawrites were happening
than should have been.
3) Make changes to buf.h to support the above, plus remove b_pfcent
at the request of David Greenman.
Reviewed by: davidg (partially)
1995-11-19 19:54:31 +00:00
Bruce Evans
0808c591da Fixed settimeofday():
- don't allow invalid timevals.
- normalize timevals as they are built - don't call timevaladd() with
  a possibly invalid timeval and normalize the result.

Fixed a warning.
1995-11-19 00:59:22 +00:00
John Dyson
0ada0d6748 Added a missing splx(s). 1995-11-18 23:33:48 +00:00
Bruce Evans
75a85811c1 Fixed the errno returned by rename("dir1", "dir2/."). It was EISDIR
(duh); translate it to EINVAL which is the errno for other renames
to ".".
1995-11-18 11:35:05 +00:00
Bruce Evans
3b9a76f03c Improved formatting.
Added a comment about possibly better handling of INPCK.

Added a prototype.
1995-11-18 11:07:00 +00:00
Bruce Evans
7bcb7905fd Cleaned up SA_NODEFER changes.
Added prototypes.
1995-11-18 10:01:38 +00:00
Poul-Henning Kamp
5204129576 All net.* sysctl converted now. 1995-11-16 19:00:27 +00:00
Bruce Evans
986f4ce75e Fixed support for DIAGNOSTIC option. SYSCTL_INT() depends on kernel.h. 1995-11-16 09:45:23 +00:00
Poul-Henning Kamp
43f242265a Do what is generally belived to be the right thing, though it may not be :-) 1995-11-14 20:43:29 +00:00
Poul-Henning Kamp
d457bade76 Final part of this bunch of sysctl commits: cleanup. 1995-11-14 09:42:22 +00:00
Poul-Henning Kamp
af8364b0ad Get rid of the last debug sysctl variables of the old style. 1995-11-14 09:40:06 +00:00
Poul-Henning Kamp
9565c0e60d Get rid of hostnamelen variable. 1995-11-14 09:37:22 +00:00
Poul-Henning Kamp
a9ad941c7a Move all the VM sysctl stuff home where it belongs. 1995-11-14 09:29:34 +00:00
Poul-Henning Kamp
16cd04a3b8 A couple of nitpicks. 1995-11-14 09:26:17 +00:00
Poul-Henning Kamp
f7152c81a0 Convert dumpdev & securelevel. 1995-11-14 09:22:15 +00:00
Poul-Henning Kamp
395e673587 Change some of the debug sysctl vars. The semantics of these will change. 1995-11-14 09:19:16 +00:00
Poul-Henning Kamp
549a075acc KERN_MAXFILESPERPROC, KERN_MAXFILES went to another file. 1995-11-14 09:17:32 +00:00
Poul-Henning Kamp
972f9b209d Hmm, I seem to have got all my patches screwed up anyway. Too bad.
this is where the proctable stuff went.
1995-11-14 09:16:27 +00:00
Poul-Henning Kamp
27aef04699 Get rid of domainnamelen. 1995-11-14 09:10:54 +00:00
Poul-Henning Kamp
a52752a457 Move KERN_NTP to a more suitable file. 1995-11-14 09:07:14 +00:00
Poul-Henning Kamp
45a4ad1146 Move the process-table stuff to a more suitable file.
Remove filetable stuff from kern_sysctl.c
1995-11-14 09:05:40 +00:00
Poul-Henning Kamp
18e6fe0250 Add new-style sysctl for KERN_FILE here. 1995-11-14 08:58:35 +00:00
Poul-Henning Kamp
deae269ab1 Try to make my new scheme work more along the lines of the manual.
There are still some gray areas here and there.
1995-11-13 13:54:09 +00:00
David Greenman
c2f9f36bae Use kmem_alloc_pageable/kmem_free to allocate memory instead of individual
VM map functions.
1995-11-13 10:45:22 +00:00
Bruce Evans
c8cbd8682f Fixed a cast in olseek().
Fixed confusing order of declarations of getvnode()'s args.
1995-11-13 08:22:21 +00:00
Poul-Henning Kamp
ae0eb976c5 The entire sysctl callback to read/write version. I havn't tested this as
much as I'd like to, but the malloc stunt I tried for an interim for
sure does worse.
Now we can read and write from any kind of address-space, not only
user and kernel, using callbacks.
This may be over-generalization for now, but it's actually simpler.
1995-11-12 19:52:09 +00:00
Bruce Evans
f35a53bf11 Restored the (buggy) historical behaviour of getdomainname().
Negative name lengths for getdomainname() and setdomainname() were
converted to large positive ones by misdeclaring the args struct.
1995-11-12 07:04:30 +00:00
Bruce Evans
d2d3e8751c Included <sys/sysproto.h> to get central declarations for syscall args
structs and prototypes for syscalls.

Ifdefed duplicated decentralized declarations of args structs.  It's
convenient to have this visible but they are hard to maintain.  Some
are already different from the central declarations.  4.4lite2 puts
them in comments in the function headers but I wanted to avoid the
large changes for that.
1995-11-12 06:43:28 +00:00
Bruce Evans
c484c256a5 Updated machine-generated files. 1995-11-12 04:29:37 +00:00
Bruce Evans
93915a2ac4 Fixed the args list for mount(). We're not ready for the BSD4.4lite2/
NetBSD interface.

Increased the bogusness of the args list for mmap().  The args lists for
most of the memory mapping functions are bogus.  The args lists in
syscalls.master are a little better than the ones in the args structs
currently being used, but the improvement for mmap() changed the object
code and I don't want to worry about that now.

Increased the bogusness of the args list for fcntl.  BSD4.4lite2/NetBSD
uses `void *' instead of int for the third arg.  This has the advantage
of working when `void *'s are longer than ints, but requires extra bogus
casts that I hope to avoid.

Fixed the args list for uname.  `struct outsname' seems to be a typo,
not an old interface.

Added comments about bogus args lists for open, mount, msync, munmap,
mprotect, madvise, mincore, fcntl, semsys, msgsys and shmsys.
1995-11-12 04:24:53 +00:00
Bruce Evans
7147b19de5 Fixed the type of readv(). An args struct member name conflicted with the
machine-generated one in <sys/sysproto.h>.
1995-11-11 06:57:34 +00:00
Bruce Evans
82970b81a9 Fixed type of setsid(). It used used the bogus `getsid_args'. 1995-11-11 06:53:08 +00:00
Bruce Evans
b2f9e8b1ee Removed unreachable code.
Changed `#if defined()' back to `#ifdef' to finish removing COMPAT_IBCS2.
1995-11-11 05:49:22 +00:00
Bruce Evans
cf7e5eab8b Fixed types of rtprio(), osetrlimit() and setrlimit(). The args struct
tag and/or member names conflicted with the machine generated ones in
<sys/sysproto.h>.
1995-11-11 01:48:17 +00:00
Bruce Evans
2635f86c68 Fixed types of ogethostid() and osethostid(). The args struct names
conflicted with the machine generated ones in <sys/sysproto.h>.

Fixed type of oquota().  It didn't even use an args struct.
1995-11-11 01:04:42 +00:00