Commit Graph

1017 Commits

Author SHA1 Message Date
John Dyson
08c2c9ddf5 Fix an spl window, a page manipulation at interrupt time that was
incorrect, and correct the support for B_ORDERED.  The spl window
fix was from Peter Wemm, and his questions led me to find the problem with
the interrupt time page manipulation.
1996-09-20 02:26:35 +00:00
Poul-Henning Kamp
e6c4b9ba32 Add the utrace(caddr_t addr,size_t len) syscall, that will store the
data pointed at in a ktrace file, if this process is being ktrace'ed.
I'm using this to profile malloc usage.
The advantage is that there is no context around this call, ie, no
open file or socket, so it will work in any process, and you can
decide if you want it to collect data or not.
1996-09-19 19:49:13 +00:00
Nate Williams
030e2e9ebb In sys/time.h, struct timespec is defined as:
/*
         * Structure defined by POSIX.4 to be like a timeval.
         */
        struct timespec {
                time_t  ts_sec;         /* seconds */
                long    ts_nsec;        /* and nanoseconds */
        };

        The correct names of the fields are tv_sec and tv_nsec.

Reminded by:	James Drobina <jdrobina@infinet.com>
1996-09-19 18:21:32 +00:00
Paul Traina
0570e4476a Add a new sysctl variable kern.sominqueue to override the MINIMUM queue
specified in a listen(2) system call.
1996-09-19 00:54:36 +00:00
John Dyson
f9da2540d2 Add needed spl protection, and some minor cleanups in vfs_vmio_release.
Submitted by:	Peter Wemm <peter@spinner.dialix.com> and me.
1996-09-18 15:57:41 +00:00
Bruce Evans
831031ce00 Attached simple external ddb commands show rtc', show pgrpdump'
and `show cbstat'.  The pgrpdump code was previously controlled by
`#ifdef DEBUG'.
1996-09-14 10:53:48 +00:00
John Dyson
8fdfa820e4 Clean up some more problems with freeing busy or wired pages. The
vfs_bio code was not waiting properly for page state until manipulating
it.
1996-09-14 04:40:33 +00:00
Bruce Evans
a7f8f2ab55 Changed cncheckc() interface so that it is 8-bit clean - return -1
instead of 0 if there is no input.
1996-09-14 04:31:09 +00:00
Bruce Evans
40b55a34ae Changed cncheckc() interface so that it is 8-bit clean - return -1
instead of 0 if there is no input.
1996-09-14 04:25:32 +00:00
Bruce Evans
d966b8d1c4 Fixed Id. 1996-09-14 01:04:18 +00:00
Bruce Evans
fc0b1dbf68 Don't use __dead in the kernel. It was an obfuscation for gcc >= 2.5
and a no-op for gcc >= 2.6.
1996-09-13 09:20:15 +00:00
John Dyson
9fc1279b79 A modification that allows the driver strategy to modify the
B_ASYNC flag broke things pretty bad (freeing buffer already on
queue or other wierd buffer queue errors.)  The broken code is
left in commented out, but this makes the problem go away for
now.
1996-09-13 03:15:45 +00:00
John Dyson
0463028c37 Fix a problem with child inheritance of sysv shm. Problem brought
to my attention by Brad Lineberger <bil@mpgn.com> and Rob Miracle.
1996-09-10 22:35:25 +00:00
Bruce Evans
f313170d3c Updated #includes to 4.4Lite style. 1996-09-10 08:32:01 +00:00
John Dyson
ae9b8c3a66 Make sure that the pager is allocated before it is needed. Hangs
can occur if the pager is not allocated in time.
1996-09-10 01:42:34 +00:00
John Dyson
5070c7f8c5 Addition of page coloring support. Various levels of coloring are afforded.
The default level works with minimal overhead, but one can also enable
full, efficient use of a 512K cache.  (Parameters can be generated
to support arbitrary cache sizes also.)
1996-09-08 20:44:49 +00:00
Søren Schmidt
9191680051 Fixed two small leftovers form PHK's mega devconf removal commit.. 1996-09-07 19:13:09 +00:00
John Dyson
a51f711975 Corrected an error where precious kernel virtual space was being allocated
for entire SYS5 SHM segments.  This is totally unnecessary, and so the
correct allocation of VM objects has been substituted.  (The vm_mmap
was misused -- vm_object_allocate is more appropriate.)
1996-09-07 03:24:44 +00:00
Poul-Henning Kamp
9d616cb5db Remove these three devconf files entirely. 1996-09-06 23:11:42 +00:00
Poul-Henning Kamp
bfbb029d87 Remove devconf, it never grew up to be of any use. 1996-09-06 23:09:20 +00:00
Justin T. Gibbs
0b64164fca Add bowrite.
Bowrite guarantees that buffers queued after a call to bowrite will
be written after the specified buffer (on a particular device).
Bowrite does this either by taking advantage of hardware ordering support
(e.g. tagged queueing on SCSI devices) or resorting to a synchronous write.
1996-09-06 05:37:53 +00:00
Bruce Evans
e7fa2650cc `struct linker_set execsw_set' was declared as const and pointers in it
were declared as non-const.  This is backwards (_lkm_exec() changes the
pointers but all the target `struct execsw's are const).  Fixed this
and poisoned related declarations to match and removed the bogus casts
that hid the bug.
1996-09-03 22:52:27 +00:00
Bruce Evans
3f6a052a89 Fixed bogus casts (const on the wrong *' in **') in a qsort-comparision
function.
1996-09-03 22:26:31 +00:00
Bruce Evans
b71fec07db Eliminated nested include of <sys/unistd.h> in <sys/file.h> in the kernel.
Include it directly in the few places where it is used.

Reduced some #includes of <sys/file.h> to #includes of <sys/fcntl.h> or
nothing.
1996-09-03 14:25:27 +00:00
Bruce Evans
c957118ef9 Added #include of <unistd.h> so that there is some chance that
_POSIX_SAVED_IDS is defined.  This feature was broken for a day
or two.
1996-09-03 12:52:58 +00:00
Satoshi Asami
1225e2435d Second phase of merge, get rid of more machine-independent-dependencies.
Get rid of pc98/pc98/pc98_device.h.

Submitted by:	The FreeBSD(98) Development Team
1996-09-03 10:24:29 +00:00
David Greenman
9e04304259 Implemented kernel side of MNT_NOATIME mount option. This option disables
the file access time update on reads and can be useful in reducing
filesystem overhead in cases where the access time is not important (like
Usenet news spools).
1996-09-03 07:09:11 +00:00
Andrey A. Chernov
3f24666649 Conditionalize POSIX saved ids code on _POSIX_SAVED_IDS define 1996-09-01 22:15:54 +00:00
David Greenman
09c75661de Change an splstatclock that should be an splhigh into an splhigh.
Reviewed by:	bde
1996-09-01 10:30:33 +00:00
David Greenman
eaed89032e Change an splclock that needs to be an splhigh into an splhigh.
Reviewed by:	bde
1996-09-01 10:10:12 +00:00
Bruce Evans
e0c95ed947 Fixed the easy cases of const poisoning in the kernel. Cosmetic. 1996-08-31 16:52:44 +00:00
Satoshi Asami
b316c8b2a7 s/pc98/isa/g in struct *_device and *_driver. Resync along the way.
Submitted by:	The FreeBSD(98) Development Team
1996-08-31 15:07:42 +00:00
Bruce Evans
09a8dfa260 Don't depend in the kernel on the gcc feature of doing arithmetic on
pointers of type `void *'.  Warn about this in future.
1996-08-31 14:48:13 +00:00
Bruce Evans
14c0cc3d51 Fixed a wrong comment. Did tsleep() ever return the networking errno
ETIMEDOUT?
1996-08-28 18:45:09 +00:00
Bruce Evans
b7ccad0af0 Fixed a stale comment. 1996-08-28 18:36:30 +00:00
Bruce Evans
f680933e5e Removed a ton of unused #includes. The introduction of SYSINIT() and
possibly the cleaning up of extern declarations made them unnecessary.
1996-08-28 18:32:51 +00:00
Julian Elischer
18cb99e99f Remove the old cleanup code as it is no longer used..
also fix two cases of = instead of ==
(cut+paste bug duplication)
1996-08-26 21:47:56 +00:00
Peter Wemm
b12e5e82b6 The socketpair(0 syscall is bogusly returning the fd numbers through
the primary and secondary return codes, causing it to not behave as
documented.  This probably originates from the ancient BSD kernels that
had pipe(2) implemented by socketpair(2), there are no binaries left that
we can run that do this.

Pointed out by: Robert Withrow <witr@rwwa.com>, PR#731
1996-08-24 03:35:13 +00:00
Wolfram Schneider
1b133036d3 add FreeBSD Inc. to copyright string 1996-08-22 17:37:02 +00:00
Julian Elischer
e0d898b48e Some cleanups to the callout lists recently added.
note that at_shutdown has a new parameter to indicate When
during a shutdown the callout should be made. also
add a RB_POWEROFF flag to reboot "howto" parameter..
tells the reboot code in our at_shutdown module to turn off the UPS
and kill the power. bound to be useful eventually on laptops
1996-08-22 03:50:33 +00:00
John Dyson
6476c0d204 Even though this looks like it, this is not a complex code change.
The interface into the "VMIO" system has changed to be more consistant
and robust.  Essentially, it is now no longer necessary to call vn_open
to get merged VM/Buffer cache operation, and exceptional conditions
such as merged operation of VBLK devices is simpler and more correct.

This code corrects a potentially large set of problems including the
problems with ktrace output and loaded systems, file create/deletes,
etc.

Most of the changes to NFS are cosmetic and name changes, eliminating
a layer of subroutine calls.  The direct calls to vput/vrele have
been re-instituted for better cross platform compatibility.

Reviewed by: davidg
1996-08-21 21:56:23 +00:00
Sujal Patel
acbfbfeaf2 Fix a minor style error in my code. 1996-08-20 15:03:41 +00:00
Sujal Patel
c2bbab53f4 Reran makesyscalls.sh after changing select()'s first argument to 'int'. 1996-08-20 07:20:29 +00:00
Sujal Patel
b08f7993c3 Remove the kernel FD_SETSIZE limit for select().
Make select()'s first argument 'int' not 'u_int'.

Reviewed by:	bde
1996-08-20 07:18:10 +00:00
Julian Elischer
269fb9d764 Collect all the functioons concerned with rebooting into one place
also add the at_shutdown callout list, and change the one user of
the present (broken) method (the vn driver) to use the new scheme.
1996-08-19 20:07:07 +00:00
Julian Elischer
313861b896 for kern_conf.c, start allocating dynamic major numbers
half way through the range rather than possibly colliding with
fixed elements. Increase the size of the arrays to take this into account..
remember that each element in the array is now only 1 ponter  so this
isn't that much..

also note a possible bug in debugging code in uipc_socket2.c (add XXX)
1996-08-19 19:22:26 +00:00
Julian Elischer
0885c1d28c fix handling of external objects referenced by mbufs
somehow this got broken between 4.3 tahoe and here, though I've been using
these fixes for over a year here..
1996-08-19 03:32:10 +00:00
Julian Elischer
fed06968ba add callout lists for exit() and fork()
I've been meaning to do this for AGES as I keep having to patch those routines
whenever I write a proprietary package or similar..

any module that assigns resources to processes needs to know when
these events occur. there are existsing modules that should be modified
to take advantage of these.. e.g. SYSV IPC primatives
presently have #ifdef entries in exit()


this also helps with making LKMs out of such things..

(see the man pages at_exit(9) and at_fork(9))
1996-08-19 02:28:24 +00:00
Julian Elischer
ad4240fec4 move all functions related to shutting down to one file
called kern_shutdown.c

note: I couldn't see anything machine dependant in the
functions boot() and dumpsys() which were in machdep.c
I have left a prototype for cpu_boot() which would go in
machdep.c, but I have nothing to put in it. Iexpect others will
let me know in no uncertain ways that this or that  is machine dependant
and should be there, but I'll way for that to happen.. :)

I haven't actually taken the functions OUT of machdep
or anywhere else yet.. I'm checking in this file so others can have a look
at it and comment. SO PLEASE DO COMMENT!

I am also (in another checkin) addinf a man(9) page for the new
at_shotdown().. er freudian slip there.. at_shutdown() call
so have a look at that (and at_exit and at_fork as well)
and feed me comments..

I'll heck in the changes to make these (shutdown) changes active tomorrow
if no-one objects too strongly..
1996-08-19 02:19:23 +00:00
Sujal Patel
de71b88098 Fix fdavail() so that correctly pays attention to the rlimit.
Fixes unp_externalize panic which occurs when a process is at it's
ulimit for file descriptors and tries to receive a file descriptor from
another process.

Reviewed by:	wollman
1996-08-15 16:33:32 +00:00