summaryrefslogtreecommitdiffstats
path: root/sys/kern
Commit message (Collapse)AuthorAgeFilesLines
* Change the way that the queue(3) structures are declared; don't assume thatjake2000-05-2326-63/+63
| | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd
* Make a trip to Pointy-Hats-R-Us and actually include the header thatmsmith2000-05-222-0/+4
| | | | | | defines ROOTDEVNAME. Submitted by: "Jeffrey S. Sharp" <jss@subatomix.com>
* Sort the sys includes.obrien2000-05-221-4/+4
|
* Back out NOTE_EXIT status reporting pending discussion.green2000-05-212-8/+2
|
* Provide a temporary undocumented option: SHM_PHYS_BACKED. This willpeter2000-05-211-0/+5
| | | | | become sysctl and/or flags controlled later. It's mainly here for an easy place to test the physical memory backed objects.
* Put the wait(2) exit status in "data" for NOTE_EXIT kevents.green2000-05-172-2/+8
|
* Fix the rootmount code for now.asmodai2000-05-142-2/+4
| | | | | | | | | This function will probably rewritten/renamed to devpp. Submitted by: Assar Westerlund <assar@sics.se> on -current Confirmed to work: Steinar Haug <sthaug@nethelp.no>, Manfred Antar <mantar@pacbell.net> Reviewed by: phk
* Fix comment typo.asmodai2000-05-121-1/+1
| | | | Submitted by: nrahlstr
* Include the UID and GID values filled in by socreate() into socket->so_credchris2000-05-111-0/+3
| | | | | | for stat() calls. Reviewed by: phk
* Include UID and GID information for stat() calls using the values filledchris2000-05-111-2/+3
| | | | | | into the file descriptor data by falloc(). Reviewed by: phk
* Regenerated (fixed the calculation of sy_nargs in sysent tables).bde2000-05-091-254/+256
|
* Fixed the calculation of sy_nargs in sysent tables. We attempted to dobde2000-05-091-25/+34
| | | | | | | | | | | | | | this in awk using the hack of counting args of type off_t twice and args of all other types once. This is too simple to work. It gave benignly wrong results on alphas (off_t shouldn't be counted twice) and for svr4_sys_mmap64() on i386's (off64_t should be counted twice). It gave fatally wrong results for i386's with 64-bit longs (longs should be counted twice). The correct value for sy_nargs is easier to determine from the size of the args struct anyway, except for complications to make the generated code almost readable. Improved formatting of sysent tables by lining up the comments where possible.
* Change the "bdev-whiner" to whine when open is attempted and extendphk2000-05-091-5/+0
| | | | the deadline a month.
* Some ioctl routines assume that the ioctl buffer is aligned, but adillon2000-05-091-3/+6
| | | | | char[] declaration makes no such guarentee. A union is used to force alignment of the char buffer.
* Regenerated (fixed the type of mmap()'s padding arg).bde2000-05-092-2/+2
|
* Fixed the declaration of mmap(). The crufty padding arg had the wrongbde2000-05-091-3/+3
| | | | | | | | | | | | type. This gave an inconsistent amount of crufty padding on i386's with 64-bit longs (8 bytes instead of 4). On alphas it gives a consistent amount of crufty padding (8 bytes) in addition to the 4 bytes of normal padding caused by passing int args as register_t's. Fixed the args struct tag for the NOPROTO syscalls (netbsd_lchown() and netbsd_msync()). The tag is currently unused for NOPROTO syscalls, so the bug has no effect, but it will be used even in the NOPROTO case to calculate sy_nargs correctly.
* Make issetugid return correctly. It was returning -1 withpeter2000-05-091-2/+1
| | | | | | errno == 1 if it was set?id! Submitted by: Valentin Nechayev <netch@segfault.kiev.ua>
* Correct a couple of typos.grog2000-05-071-2/+2
|
* Remove devstat_end_transaction_buf() everybody usesphk2000-05-061-18/+0
| | | | devstat_end_transaction_bio() now.
* Separate the struct bio related stuff out of <sys/buf.h> intophk2000-05-0517-2/+17
| | | | | | | | | | | | | | | <sys/bio.h>. <sys/bio.h> is now a prerequisite for <sys/buf.h> but it shall not be made a nested include according to bdes teachings on the subject of nested includes. Diskdrivers and similar stuff below specfs::strategy() should no longer need to include <sys/buf.> unless they need caching of data. Still a few bogus uses of struct buf to track down. Repocopy by: peter
* Fix one bug where the kn_head list could be manipulated withoutjlemon2000-05-041-2/+8
| | | | | | | | | spl() protection in the case of a copyout error. Add missing spl calls around the intial activation call that is done when when the kevent is added. Add two KASSERT macros to help catch errors in the future.
* If BUS_DEBUG is defined then create a sysctl, debug.bus_debug, thatpaul2000-05-031-1/+6
| | | | | | | | | | is used to control whether the debug messages are output at runtime. It defaults to on so that if you define BUS_DEBUG in your kernel then you get all the debugging info when you boot. It's very useful for disabling all the debugging info when you're developing a loadable device driver and you're doing lots of loads and unloads but don't always want to see all the debugging info.
* Replace all the ifdef debugging spaghetti with a single ifdef andpaul2000-05-031-40/+22
| | | | a macro so that it is easier to read the flow of the code.
* Add $FreeBSD$peter2000-05-011-0/+1
|
* Give struct bio it's own call back mechanism.phk2000-05-012-24/+20
|
* Move the MSG* and SEM* options to opt_sysvipc.hpeter2000-05-013-95/+222
| | | | | | | | | | | | | | | Remove evil allocation macros from machdep.c (why was that there???) and use malloc() instead. Move paramters out of param.h and into the code itself. Move a bunch of internal definitions from public sys/*.h headers (without #ifdef _KERNEL even) into the code itself. I had hoped to make some of this more dynamic, but the cost of doing wakeups on all sleeping processes on old arrays was too frightening. The other possibility is to initialize on the first use, and allow dynamic sysctl changes to parameters right until that point. That would allow /etc/rc.sysctl to change SEM* and MSG* defaults as we presently do with SHM*, but without the nightmare of changing a running system.
* Regenerate (removed semconfig)peter2000-05-012-4/+4
|
* Remove the undocumented, flawed, broken-as-designed semconfig() syscall.peter2000-05-012-88/+2
|
* Remove undocumented broken-as-designed semconfig() syscall.peter2000-05-011-1/+1
|
* Move t_timeout initializing to ttyregisterache2000-05-011-1/+1
| | | | Pointed-by: bde
* * Move the driver_t::refs field to kobj_t to replace kobj_t::instances.dfr2000-05-012-10/+7
| | | | | * Back out a couple of workarounds for the confusion between kobj_t::instances and driver_t::refs.
* Since ptys are allocated dynamically, there is no needs to keep theirache2000-05-011-1/+1
| | | | t_timeout across close, so move t_timeout initializing to ptcopen
* Set t_timeout to its default sysctl value only once in ttyopenache2000-05-012-1/+4
| | | | | | Initialize t_timeout to -1 for this reason Pointed-by: bde
* Remove unneeded #include <vm/vm_zone.h>phk2000-04-3013-13/+0
| | | | Generated by: src/tools/tools/kerninclude
* Change the scheduler to actually respect the PUSER barrier. It's beengreen2000-04-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wrong for many years that negative niceness would lower the priority of a process below PUSER, and once below PUSER, there were conditionals in the code that are required to test for whether a process was in the kernel which would break. The breakage could (and did) cause lock-ups, basically nothing else but the least nice program being able to run in some conditions. The algorithm which adjusts the priority now subtracts PRIO_MIN to do things properly, and the ESTCPULIM() algorithm was updated to use PRIO_TOTAL (PRIO_MAX - PRIO_MIN) to calculate the estcpu. NICE_WEIGHT is now 1 to accomodate the full range of priorities better (a -20 process with full CPU time has the priority of a +0 process with no CPU time). There are now 20 queues (exactly; 80 priorities) for use in user processes' scheduling, and PUSER has been lowered to 48 to accomplish this. This means, to the user, that things will be scheduled more correctly (noticeable), there is no lock-up anymore WRT a niced -20 process never releasing the CPU time for other processes. In this fair system, tsleep()ed < PUSER processes now will get the proper higher priority than priority >= PUSER user processes. The detective work of this was done by me, along with part of the solution. Luoqi Chen has provided most of the solution, and really helped me understand what was happening better, to boot :) Submitted by: luoqi Concept reviewed by: bde
* Add sysctl variable to set initial drainwait timeout on ttyopen, default toache2000-04-301-1/+5
| | | | 5 minutes
* Hmm, diff/patch still doesn't like me.phk2000-04-301-2/+2
| | | | Missed one s/biowait/bufwait/g
* s/biowait/bufwait/gphk2000-04-294-10/+10
| | | | Prodded by: several.
* Remove a leftover dysonism.phk2000-04-291-4/+0
|
* Remove unneeded #include <sys/kernel.h>phk2000-04-291-1/+0
|
* The newer module dependency code exposes an apparent bug in thepeter2000-04-291-0/+1
| | | | | | | | | | | | | bus/driver/kobj system. I am not 100% sure that this is the correct fix, but it is harmless and does seem to solve the problem. At worst, it could cause a tiny memory leak at unload time - this is better than a free(NULL) and subsequent panic. I'm waiting for comments from Doug about this. This may yet be backed out and fixed differently. The change itself is to increment the reference count on drivers in one case where it appears to have been missed. When everything is unloaded, kobj_class_free() was being called twice in some cases, and panicing the second time.
* First round implementation of a fine grain enhanced module to modulepeter2000-04-296-376/+639
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | version dependency system. This isn't quite finished, but it is at a useful stage to do a functional checkpoint. Highlights: - version and dependency metadata is gathered via linker sets, so things are handled the same for static kernels and code built to live in a kld. - The dependencies are at module level (versus at file level). - Dependencies determine kld symbol search order - this means that you cannot link against symbols in another file unless you depend on it. This is so that you cannot accidently unload the target out from underneath the ones referencing it. - It is flexible enough that we can put tags in #include files and macros so that we can get decent hooks for enforcing recompiles on incompatable ABI changes. eg: if we change struct proc, we could force a recompile for all kld's that reference the proc struct. - Tangled dependency references at boot time are sorted. Files are relocated once all their dependencies are already relocated. Caveats: - Loader support is incomplete, but has been worked on seperately. - Actual enforcement of the version number tags is not active yet - just the module dependencies are live. The actual structure of versioning hasn't been agreed on yet. (eg: major.minor, or whatever) - There is some backwards compatability for old modules without metadata but I'm not sure how good it is. This is based on work originally done by Boris Popov (bp@freebsd.org), but I'm not sure he'd recognize much of it now. Don't blame him. :-) Also, ideas have been borrowed from Mike Smith.
* Do not fault if curproc is null.peter2000-04-291-1/+1
|
* Do not use uprintf() for link time error messages. This has unpleasantpeter2000-04-292-8/+8
| | | | | consequences when it happens in the preload support, before curproc or the tty system exist.
* Hookup /dev/[u]random on the Alpha.obrien2000-04-281-1/+16
|
* Add default 5min timeout for output drain to stop hanging on exit or in otherache2000-04-271-0/+2
| | | | places when connection dropped
* Fix #! script exec under linux emulation. If a script is exec'd from adillon2000-04-262-32/+37
| | | | | | | | | | program running under linux emulation, the script binary is checked for in /compat/linux first. Without this patch the wrong script binary (i.e. the FreeBSD binary) will be run instead of the linux binary. For example, #!/bin/sh, thus breaking out of linux compatibility mode. This solves a number of problems people have had installing linux software on FreeBSD boxes.
* Move procfs_fullpath() to vfs_cache.c, with a rename to textvp_fullpath().green2000-04-261-0/+110
| | | | | | | | | | There's no excuse to have code in synthetic filestores that allows direct references to the textvp anymore. Feature requested by: msmith Feature agreed to by: warner Move requested by: phk Move agreed to by: bde
* Remove unused variable.mjacob2000-04-261-1/+0
|
* Clone the {b|bio}_offset field, and make sure it is always initializedphk2000-04-251-0/+2
| | | | | | | in struct bio. Eventually, bio_offset will probably obsolete the bio_blkno and bio_pblkno fields. Remove the special hack in atapi-cd.c to determine of bio_offset was valid.
OpenPOWER on IntegriCloud