summaryrefslogtreecommitdiffstats
path: root/sys/kern
Commit message (Collapse)AuthorAgeFilesLines
* Implement a new generic mechanism for attaching handler functions tomsmith1999-08-213-138/+201
| | | | | | | | | | | | | events, in order to pave the way for removing a number of the ad-hoc implementations currently in use. Retire the at_shutdown family of functions and replace them with new event handler lists. Rework kern_shutdown.c to take greater advantage of the use of event handlers. Reviewed by: green
* First small steps at merging DEVFS and PHK's Dev_t stuff.julian1999-08-203-29/+32
|
* Change the name of the static variable 'files' to 'linker_files' ingrog1999-08-201-14/+14
| | | | | | order to be able to refer to it uniquely from the kernel debugger. Approved-by: peter
* Fix a typo and a bug.peter1999-08-191-10/+12
| | | | | | - One RTP_PRIO_REALTIME was meant to be RTP_PRIO_IDLE. - RTP_PRIO_FIFO was not handled. - Move the usual case first for setrunqueue() etc.
* Don't initialize run queues here, do it all in one place.peter1999-08-191-22/+2
|
* Run queue heads have moved to TAILQ's.peter1999-08-191-5/+1
|
* Extract the next runnable process selection out of cpu_switch() into apeter1999-08-191-0/+204
| | | | | | | fairly machine independent C routine. gcc actually does a pretty good job of this. Reviewed by: msmith (in principle)
* Remove redundant spaces in the whole line, not only the first occurrence.n_hibma1999-08-181-3/+3
| | | | (not that anyone actually reads the created .c and .h files :)
* Devfs isn't quite dead yet... Add back devfs support to ptys..julian1999-08-171-1/+36
| | | | | | When you use pty(N) it creates pty(N+1) ready for your use in the DEVFS, so DEVFS is not cluttered up with hundreds of ptys you are never going to use.
* Welcome devtoname(), to most likely be used when printing informationbillf1999-08-171-1/+8
| | | | | | | | | | about a dev_t. printf("%x", dev) now becomes printf("%s", devtoname(dev)) because printing actual information about the device is much more useful then printing a pointer to an address that would never help the developer debug. Submitted by: phk, bde
* Change calling of chained event handler from always aftern_hibma1999-08-161-3/+7
| | | | | | | | | | the attach/detach to 1) MOD_LOAD before attach 2) MOD_UNLOAD after detach The driver specific event handler can now be used to function as driver specific init/deinit function (compare to device specific init/deinit functions: attach & detach).
* expand_name:billf1999-08-161-5/+5
| | | | | | | use pid_t and uid_t in the declaration as that is what we are passed fix printf formatters accordingly. Reviewed by: green
* Introduce lminor(dev_t dev), which returns a linear minor number,phk1999-08-151-1/+12
| | | | ie: hides the fact that the major number is stuck in the middle.
* Fix potential overflow, remove unnecessary bzero.alfred1999-08-141-12/+11
| | | | | | | | Pointed out by: green remove redundant strlen, sprintf returns the length. Reviewed by: peter
* add debugging message in unregister_methodn_hibma1999-08-141-1/+2
|
* Minor spelling glitchn_hibma1999-08-141-2/+2
|
* Spring cleaning around strategy and disklabels/slices:phk1999-08-146-94/+49
| | | | | | | | | | | | | | Introduce BUF_STRATEGY(struct buf *, int flag) macro, and use it throughout. please see comment in sys/conf.h about the flag argument. Remove strategy argument from all the diskslice/label/bad144 implementations, it should be found from the dev_t. Remove bogus and unused strategy1 routines. Remove open/close arguments from dssize(). Pick them up from dev_t. Remove unused and unfinished setgeom support from diskslice/label/bad144 code.
* Grrrr. Fix a really lame bug that I tripped over while testing my miibuswpaul1999-08-141-2/+2
| | | | | | | | | | | | | | | | stuff: unregister_methods() is horribly broken. The idea, if I'm not mistaken, is that the refcount on a method is decremented, and only when it reaches zero is the method freed. However desc->method is set to NULL unconditionally regardless of the refcount, which means the method pointer is trashed the first time the method is deallocated. The obvious detrimental effect is that memory is leaked. The not so obvious effect is that when you call unregister_method() the second time on the same method, you get a NULL pointer dereference and a panic. Now I can successfully unload network device drivers and the miibus module without crashing the system. *sigh*
* oops: Add missing include.phk1999-08-131-1/+2
|
* Move the special-casing of stat(2)->st_blksize for device filesphk1999-08-131-2/+15
| | | | | | from UFS to the generic level. For chr/blk devices we don't care about the blocksize of the filesystem, we want what the device asked for.
* Register our dev_t with make_devphk1999-08-131-13/+2
|
* The bdevsw() and cdevsw() are now identical, so kill the former.phk1999-08-134-18/+14
|
* s/v_specinfo/v_rdev/phk1999-08-133-10/+10
|
* Replace a redundant vfs_object_create() call (already done in vn_open)alfred1999-08-122-6/+8
| | | | | | with a KASSERT. Reviewed by: Eivind, Alan Cox
* Make subr_bus.c actually compile with -DBUS_DEBUGpeter1999-08-111-6/+6
|
* Add CPT_NOA, LIBCOMPAT, NODEF, NOARGS, NOPROTO, and NOIMPL to the commentednik1999-08-111-2/+3
| | | | | | | list of available types. PR: docs/13007 Submitted by: Assar Westerlund <assar@sics.se>
* Zap some stray references to DRIVER_TYPE_foo in the BUS_DEBUG case, aspeter1999-08-111-12/+3
| | | | discovered by Bill Paul.
* Stop profiling on exec.imp1999-08-111-1/+4
| | | | Obtained from: NetBSD
* When doing a dump, if ENODEV is returned explain what happened to the user,alfred1999-08-111-3/+13
| | | | | | | | | "the device doesn't support a dump routine" Only print "dump succeeded" when 0 is returned, instead of when an unexpected error number is returned, print that error number. Reviewed by: Eivind
* make alpha compile again.phk1999-08-091-2/+2
|
* Merge the cons.c and cons.h to the best of my ability. alpha may orphk1999-08-094-18/+11
| | | | may not compile, I can't test it.
* Enable ttymalloc().phk1999-08-081-9/+6
|
* Add new sysctl "kern.ttys" which return all the struct tty's which havephk1999-08-082-2/+35
| | | | | | been registered with ttyregister(). register ptys with ttyregister().
* Make the pty driver as close to a cloning device as we can get for now,phk1999-08-081-99/+62
| | | | | | | | | we create the pty on the fly when it is first opened. If you run out of ptys now, just MAKEDEV some more. This also demonstrate the use of dev_t->si_tty_tty and dev_t->si_drv1 in a device driver.
* Decommision miscfs/specfs/specdev.h. Most of it goes into <sys/conf.h>,phk1999-08-086-17/+31
| | | | | | a few lines into <sys/vnode.h>. Add a few fields to struct specinfo, paving the way for the fun part.
* cdevsw_remove: place correct value in bmaj2cmaj. This had causedgrog1999-08-081-2/+2
| | | | | | | | | | warnings of the following nature on reloading a kld: WARNING: "vinum" is usurping "console"'s bmaj This only applies to cases where "console" is mentioned. Broken-by: grog
* Make long longs ("%ll" format) work.green1999-08-071-2/+6
| | | | Reviewed by: msmith
* Re-commit these files after updating syscalls.master (in the proper orderjkh1999-08-052-2/+2
| | | | | | this time). Pointed out by: bde
* Move syscall 180 back to where it was before and fix thejkh1999-08-051-3/+3
| | | | incorrect comment which led me to move it in the first place.
* Reserve a syscall for the arla folks. I'm assuming that since syscalls.cjkh1999-08-043-2/+5
| | | | | and init_sysent.c are checked into CVS, I should also commit the regenerated copies even though they're built by syscalls.master. Correct? Bruce? :)
* Fix fd race conditions (during shared fd table usage.) Badfileops isgreen1999-08-047-33/+92
| | | | | | | | | | | | now used in f_ops in place of NULL, and modifications to the files are more carefully ordered. f_ops should also be set to &badfileops upon "close" of a file. This does not fix other problems mentioned in this PR than the first one. PR: 11629 Reviewed by: peter
* o Typo in prior version kept it from compiling (blush).imp1999-08-042-12/+18
| | | | | | | Noticed by: Nobody! o Add comment about why we restrict chflags to root for devices. o nit noticed by bde wrt return values.
* brucify:imp1999-08-032-12/+12
| | | | | | | | | | | | | | | o use suser_xxx rather than suser to support JAIL code. o KNF comment convention o use vp->type rather than vaddr.type and eliminate call to VOP_GETATTR. Bruce says that vp->type is valid at this point. Submitted by: bde. Not fixed: o return (value) o Comment needs to be longer and more explicit. It will be after the advisory.
* Only allow root to set file flags on devices.imp1999-08-022-2/+16
|
* lutimes() bug: FOLLOW should be NOFOLLOW for this one.green1999-07-292-4/+4
| | | | Submitted by: Dan Nelson <dnelson@emsphone.com>
* Removed references to a nonexistent variable. This fixes building kernelsbde1999-07-291-4/+1
| | | | without -O.
* Fix a typo.mdodd1999-07-291-2/+2
| | | | | | Back out a few lines that I haven't dealt with properly yet. Snickered at by: Mike Smith
* Alter the behavior of sys/kern/subr_bus.c:device_print_child()mdodd1999-07-292-14/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - device_print_child() either lets the BUS_PRINT_CHILD method produce the entire device announcement message or it prints "foo0: not found\n" Alter sys/kern/subr_bus.c:bus_generic_print_child() to take on the previous behavior of device_print_child() (printing the "foo0: <FooDevice 1.1>" bit of the announce message.) Provide bus_print_child_header() and bus_print_child_footer() to actually print the output for bus_generic_print_child(). These functions should be used whenever possible (unless you can just use bus_generic_print_child()) The BUS_PRINT_CHILD method now returns int instead of void. Modify everything else that defines or uses a BUS_PRINT_CHILD method to comply with the above changes. - Devices are 'on' a bus, not 'at' it. - If a custom BUS_PRINT_CHILD method does the same thing as bus_generic_print_child(), use bus_generic_print_child() - Use device_get_nameunit() instead of both device_get_name() and device_get_unit() - All BUS_PRINT_CHILD methods return the number of characters output. Reviewed by: dfr, peter
* Add sysctl and support code to allow directories to be VMIO'd. The defaultalc1999-07-267-16/+19
| | | | | | setting for the sysctl is OFF, which is the historical operation. Submitted by: dillon
* On FPU exceptions, pass a useful error code (one of the FPE_...cracauer1999-07-251-4/+4
| | | | | | | | | | | | | | | | macros) to the signal handler, for old-style BSD signal handlers as the second (int) argument, for SA_SIGINFO signal handlers as siginfo_t->si_code. This is source-compatible with Solaris, except that we have no <siginfo.h> (which isn't even mentioned in POSIX 1003.1b). An rather complete example program is at http://www3.cons.org/cracauer/freebsd-signal.c This will be added to the regression tests in src/. This commit also adds code to disable the (hardware) FPU from userconfig, so that you can use a software FP emulator on a machine that has hardware floating point. See LINT.
OpenPOWER on IntegriCloud