summaryrefslogtreecommitdiffstats
path: root/sys/dev/streams
Commit message (Collapse)AuthorAgeFilesLines
* falloc allocates a file structure and adds it to the file descriptordwmalone2003-10-191-3/+12
| | | | | | | | | | | | | | | | | | | | | table, acquiring the necessary locks as it works. It usually returns two references to the new descriptor: one in the descriptor table and one via a pointer argument. As falloc releases the FILEDESC lock before returning, there is a potential for a process to close the reference in the file descriptor table before falloc's caller gets to use the file. I don't think this can happen in practice at the moment, because Giant indirectly protects closes. To stop the file being completly closed in this situation, this change makes falloc set the refcount to two when both references are returned. This makes life easier for several of falloc's callers, because the first thing they previously did was grab an extra reference on the file. Reviewed by: iedowse Idea run past: jhb
* Use __FBSDID().obrien2003-08-241-1/+3
| | | | Also some minor style cleanups.
* Initialize struct fileops with C99 sparse initialization.phk2003-06-181-2/+7
|
* Put definition of struct svr4_sockcache_entry in a .h file rather thanphk2003-05-311-10/+1
| | | | | | | having two independent definitions in two .c files. Fiddle surrounding details to match. Found by: FlexeLint
* Gigacommit to improve device-driver source compatibility betweenphk2003-03-031-13/+3
| | | | | | | | | | | | | branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl)
* Back out M_* changes, per decision of the TRB.imp2003-02-191-1/+1
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-1/+1
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Bow to the whining masses and change a union back into void *. Retaindillon2003-01-131-4/+4
| | | | | removal of unnecessary casts and throw in some minor cleanups to see if anyone complains, just for the hell of it.
* Change struct file f_data to un_data, a union of the correct structdillon2003-01-121-4/+4
| | | | | | | | | | pointer types, and remove a huge number of casts from code using it. Change struct xfile xf_data to xun_data (ABI is still compatible). If we need to add a #define for f_data and xf_data we can, but I don't think it will be necessary. There are no operational changes in this commit.
* s/sokqfilter/soo_kqfilter/ for consistency with the naming of allphk2002-12-231-1/+1
| | | | other socket/file operations.
* SCARGS removal take II.alfred2002-12-141-3/+3
|
* Backout removal SCARGS, the code freeze is only "selectively" over.alfred2002-12-131-3/+3
|
* Remove SCARGS.alfred2002-12-131-3/+3
| | | | Reviewed by: md5
* Remove __P.alfred2002-03-201-2/+2
|
* Simple p_ucred -> td_ucred changes to start using the per-thread ucredjhb2002-02-271-1/+1
| | | | reference.
* SMP Lock struct file, filedesc and the global file list.alfred2002-01-131-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Seigo Tanimura (tanimura) posted the initial delta. I've polished it quite a bit reducing the need for locking and adapting it for KSE. Locks: 1 mutex in each filedesc protects all the fields. protects "struct file" initialization, while a struct file is being changed from &badfileops -> &pipeops or something the filedesc should be locked. 1 mutex in each struct file protects the refcount fields. doesn't protect anything else. the flags used for garbage collection have been moved to f_gcflag which was the FILLER short, this doesn't need locking because the garbage collection is a single threaded container. could likely be made to use a pool mutex. 1 sx lock for the global filelist. struct file * fhold(struct file *fp); /* increments reference count on a file */ struct file * fhold_locked(struct file *fp); /* like fhold but expects file to locked */ struct file * ffind_hold(struct thread *, int fd); /* finds the struct file in thread, adds one reference and returns it unlocked */ struct file * ffind_lock(struct thread *, int fd); /* ffind_hold, but returns file locked */ I still have to smp-safe the fget cruft, I'll get to that asap.
* Staticise the device node pointers.msmith2002-01-081-1/+1
|
* o Make the credential used by socreate() an explicit argument torwatson2001-12-311-1/+2
| | | | | | | | | | | | | | socreate(), rather than getting it implicitly from the thread argument. o Make NFS cache the credential provided at mount-time, and use the cached credential (nfsmount->nm_cred) when making calls to socreate() on initially connecting, or reconnecting the socket. This fixes bugs involving NFS over TCP and ipfw uid/gid rules, as well as bugs involving NFS and mandatory access control implementations. Reviewed by: freebsd-arch
* cast dev_t to int in printf to fix warning.dillon2001-10-291-1/+1
|
* KSE Milestone 2julian2001-09-121-15/+17
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Send the remains (such as I have located) of "block major numbers" tophk2001-03-261-1/+0
| | | | the bit-bucket.
* Extend kqueue down to the device layer.jlemon2001-02-151-1/+2
| | | | Backwards compatible approach suggested by: peter
* - Add necessary proc locking.jhb2001-01-231-5/+15
| | | | | | - Use proper atomic operations to make the run time initialization controlled by svr_str_initialized be MP safe. - Use appropriate queue(3) macros where needed.
* Cleanup after repo copy of sys/svr4 to sys/compat/svr4.obrien2000-09-011-6/+6
|
* Back out the previous change to the queue(3) interface.jake2000-05-261-2/+2
| | | | | | It was not discussed and should probably not happen. Requested by: msmith and others
* Change the way that the queue(3) structures are declared; don't assume thatjake2000-05-231-2/+2
| | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd
* Give the "streams" modulea version (1) and depend on it from thegreen2000-05-061-0/+1
| | | | | "svr4elf" module. This unbreaks the SVR4 KLD (which had an undefined function because of thenewly-committed KLD enhancements).
* Rename remove_dev() to destroy_dev().phk1999-11-081-10/+10
| | | | Nagged about by: msmith
* Update the stream socket fileops table to match fo_stat() additions.peter1999-11-081-1/+1
|
* Replace cdevsw_add() and friends with make_dev()/remove_dev().newton1999-10-101-2/+41
|
* zap #include "streams.h" (for NSTREAMS) - which isn't used.peter1999-09-271-1/+0
|
* Remove five now unused fields from struct cdevsw. They should neverphk1999-09-251-5/+0
| | | | | | | | have been there in the first place. A GENERIC kernel shrinks almost 1k. Add a slightly different safetybelt under nostop for tty drivers. Add some missing FreeBSD tags
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Convert DEVFS hooks in (most) drivers to make_dev().phk1999-08-231-21/+1
| | | | | | | | | | | | | | | | Diskslice/label code not yet handled. Vinum, i4b, alpha, pc98 not dealt with (left to respective Maintainers) Add the correct hook for devfs to kern_conf.c The net result of this excercise is that a lot less files depends on DEVFS, and devtoname() gets more sensible output in many cases. A few drivers had minor additional cleanups performed relating to cdevsw registration. A few drivers don't register a cdevsw{} anymore, but only use make_dev().
* Fix fd race conditions (during shared fd table usage.) Badfileops isgreen1999-08-041-4/+4
| | | | | | | | | | | | 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
* Cleanup - diked out a heap of old KLM stuff that isn't needed anymore.newton1999-08-011-65/+3
|
* Eliminate 'WARNING: "streams" is usurping "streams"'s cdevsw[]' messagesnewton1999-07-301-2/+2
| | | | at boot
* Simplify cdevsw registration.phk1999-05-311-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | The cdevsw_add() function now finds the major number(s) in the struct cdevsw passed to it. cdevsw_add_generic() is no longer needed, cdevsw_add() does the same thing. cdevsw_add() will print an message if the d_maj field looks bogus. Remove nblkdev and nchrdev variables. Most places they were used bogusly. Instead check a dev_t for validity by seeing if devsw() or bdevsw() returns NULL. Move bdevsw() and devsw() functions to kern/kern_conf.c Bump __FreeBSD_version to 400006 This commit removes: 72 bogus makedev() calls 26 bogus SYSINIT functions if_xe.c bogusly accessed cdevsw[], author/maintainer please fix. I4b and vinum not changed. Patches emailed to authors. LINT probably broken until they catch up.
* This commit should be a extensive NO-OP:phk1999-05-301-14/+20
| | | | | | | | | | | | | Reformat and initialize correctly all "struct cdevsw". Initialize the d_maj and d_bmaj fields. The d_reset field was not removed, although it is never used. I used a program to do most of this, so all the files now use the same consistent format. Please keep it that way. Vinum and i4b not modified, patches emailed to respective authors.
* ``fix'' the devfs_add_devswf() calls, the printf string wasn't factoringpeter1999-05-061-10/+10
| | | | | in the unit number. I'm not so sure about this at all, the SVR4 systems I have access to have a mixture of names and often %03d format units.
* Converted "streams" pseudo-device into a KLDnewton1999-02-221-0/+29
|
* Nuke some prototypes that really shouldn't be here.newton1999-02-011-8/+0
|
* New pseudo-device to provide for a way of obtaining a socket by open()ingnewton1999-01-301-0/+427
something in /dev. Obtained from: Christos Zoulas, with FreeBSD modifications
OpenPOWER on IntegriCloud