Commit Graph

763 Commits

Author SHA1 Message Date
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