1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-25 11:37:56 +00:00
freebsd/sys/kern
Brian Feldman 13ccadd4b0 This is what was "fdfix2.patch," a fix for fd sharing. It's pretty
far-reaching in fd-land, so you'll want to consult the code for
changes.  The biggest change is that now, you don't use
	fp->f_ops->fo_foo(fp, bar)
but instead
	fo_foo(fp, bar),
which increments and decrements the fp refcount upon entry and exit.
Two new calls, fhold() and fdrop(), are provided.  Each does what it
seems like it should, and if fdrop() brings the refcount to zero, the
fd is freed as well.

Thanks to peter ("to hell with it, it looks ok to me.") for his review.
Thanks to msmith for keeping me from putting locks everywhere :)

Reviewed by:	peter
1999-09-19 17:00:25 +00:00
..
bus_if.m $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
device_if.m $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
imgact_aout.c Fixed style regressions in previous commit. 1999-09-04 13:30:18 +00:00
imgact_elf.c General cleanup of core-dumping code. 1999-09-01 00:29:56 +00:00
imgact_gzip.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
imgact_shell.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
inflate.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
init_main.c Moved the definition of `boottime' and its sysctl to the correct file. 1999-09-13 14:22:27 +00:00
init_sysent.c regenerate to include proper "gererated from" taglines. 1999-09-11 01:06:03 +00:00
kern_acct.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
kern_clock.c Moved the definition of `boottime' and its sysctl to the correct file. 1999-09-13 14:22:27 +00:00
kern_conf.c Const'ify devtoname() and d_name. This exposes some errors (2 non-benign). 1999-09-13 12:29:32 +00:00
kern_descrip.c This is what was "fdfix2.patch," a fix for fd sharing. It's pretty 1999-09-19 17:00:25 +00:00
kern_environment.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
kern_exec.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
kern_exit.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
kern_fork.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
kern_intr.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
kern_jail.c Add a version number field to the jail(2) argument so that future changes 1999-09-19 08:36:03 +00:00
kern_kthread.c Slight reorganization of kernel thread/process creation. Instead of using 1999-07-01 13:21:46 +00:00
kern_ktrace.c ktrace should not follow symlinks either. 1999-08-30 19:08:28 +00:00
kern_linker.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
kern_lock.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
kern_lockf.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
kern_malloc.c KASSERT that we cannot use M_WAITOK in interrupt context. 1999-09-19 08:40:11 +00:00
kern_mib.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
kern_module.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
kern_ntptime.c pps_shiftmax only exists #ifdef PPS_SYNC 1999-08-30 16:21:32 +00:00
kern_physio.c Remove replace phygetvpbuf() with direct call to getpbuf(); 1999-09-12 08:27:41 +00:00
kern_proc.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
kern_prot.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
kern_random.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
kern_resource.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
kern_shutdown.c Remove unneeded "maj" variable. 1999-08-29 14:54:11 +00:00
kern_sig.c Make prototype match function. 1999-09-01 16:21:57 +00:00
kern_subr.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
kern_switch.c Fix a typo and a bug. 1999-08-19 16:06:08 +00:00
kern_synch.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
kern_syscalls.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
kern_sysctl.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
kern_tc.c Moved the definition of `boottime' and its sysctl to the correct file. 1999-09-13 14:22:27 +00:00
kern_threads.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
kern_time.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
kern_timeout.c Restructure TCP timeout handling: 1999-08-30 21:17:07 +00:00
kern_xxx.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
ksched.c 1. Add new defs for mins and maxs for the POSIX flavor priorities. They 1998-05-19 21:11:53 +00:00
link_aout.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
link_elf_obj.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
link_elf.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Make.tags.inc Update to know about current kernel directory layout. 1999-02-28 22:14:16 +00:00
makedevops.pl $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Makefile Added ../sys/syscall.mk to targets. Back it up like all the other 1999-05-13 09:19:14 +00:00
makesyscalls.sh Add $FreeBSD$ tags to generated files otherwise the checker won't let them 1999-09-10 23:34:30 +00:00
md5c.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
p1003_1b.c Well folks, this is it - The second stage of the removal for build support 1999-04-17 08:36:07 +00:00
posix4_mib.c * Change sysctl from using linker_set to construct its tree using SLISTs. 1999-02-16 10:49:55 +00:00
subr_autoconf.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
subr_blist.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
subr_bus.c Create and use a dedicated malloc type for bus related stuff. 1999-09-10 21:11:23 +00:00
subr_clist.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
subr_devstat.c Move an end-paren to its intended place. 1999-09-19 08:28:49 +00:00
subr_disk.c Register the right cdevsw on the master device. 1999-09-13 18:20:21 +00:00
subr_disklabel.c Removed diskerr()'s unused d_name arg and updated callers. This fixes 1999-09-13 12:59:41 +00:00
subr_diskmbr.c Removed diskerr()'s unused d_name arg and updated callers. This fixes 1999-09-13 12:59:41 +00:00
subr_diskslice.c Const poisoning from d_name. 1999-09-13 14:12:23 +00:00
subr_dkbad.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
subr_eventhandler.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
subr_log.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
subr_module.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
subr_param.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
subr_prf.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
subr_prof.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
subr_rman.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
subr_scanf.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
subr_smp.c Set up FPU state on the AP. 1999-09-05 20:17:40 +00:00
subr_trap.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
subr_xxx.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
sys_generic.c This is what was "fdfix2.patch," a fix for fd sharing. It's pretty 1999-09-19 17:00:25 +00:00
sys_pipe.c This is what was "fdfix2.patch," a fix for fd sharing. It's pretty 1999-09-19 17:00:25 +00:00
sys_process.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
sys_socket.c This is what was "fdfix2.patch," a fix for fd sharing. It's pretty 1999-09-19 17:00:25 +00:00
syscalls.c regenerate to include proper "gererated from" taglines. 1999-09-11 01:06:03 +00:00
syscalls.master Seperate the export check in VFS_FHTOVP, exports are now checked via 1999-09-11 00:46:08 +00:00
sysv_ipc.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
sysv_msg.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
sysv_sem.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
sysv_shm.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
tty_compat.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
tty_conf.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
tty_cons.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
tty_pty.c s/si_tty_tty/si_tty/g 1999-08-30 10:35:37 +00:00
tty_snoop.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
tty_subr.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
tty_tb.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
tty_tty.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
tty.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
uipc_domain.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
uipc_mbuf.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
uipc_proto.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
uipc_sockbuf.c Change so_cred's type to a ucred, not a pcred. THis makes more sense, actually. 1999-09-19 02:17:02 +00:00
uipc_socket2.c Change so_cred's type to a ucred, not a pcred. THis makes more sense, actually. 1999-09-19 02:17:02 +00:00
uipc_socket.c Change so_cred's type to a ucred, not a pcred. THis makes more sense, actually. 1999-09-19 02:17:02 +00:00
uipc_syscalls.c This is what was "fdfix2.patch," a fix for fd sharing. It's pretty 1999-09-19 17:00:25 +00:00
uipc_usrreq.c Change so_cred's type to a ucred, not a pcred. THis makes more sense, actually. 1999-09-19 02:17:02 +00:00
vfs_aio.c This is what was "fdfix2.patch," a fix for fd sharing. It's pretty 1999-09-19 17:00:25 +00:00
vfs_bio.c Allow getblk() to be called from an idle context (by panic() inside 1999-09-03 17:49:25 +00:00
vfs_cache.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
vfs_cluster.c If integration of a buffer into a cluster write operation fails, release 1999-08-31 14:18:32 +00:00
vfs_conf.c Fix BOOTP root FS mounts. Also cleanup vfs_getnewfsid() and collapse 1999-09-19 06:24:21 +00:00
vfs_default.c Seperate the export check in VFS_FHTOVP, exports are now checked via 1999-09-11 00:46:08 +00:00
vfs_export.c Fix BOOTP root FS mounts. Also cleanup vfs_getnewfsid() and collapse 1999-09-19 06:24:21 +00:00
vfs_extattr.c Seperate the export check in VFS_FHTOVP, exports are now checked via 1999-09-11 00:46:08 +00:00
vfs_init.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
vfs_lookup.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
vfs_mount.c Fix BOOTP root FS mounts. Also cleanup vfs_getnewfsid() and collapse 1999-09-19 06:24:21 +00:00
vfs_subr.c Fix BOOTP root FS mounts. Also cleanup vfs_getnewfsid() and collapse 1999-09-19 06:24:21 +00:00
vfs_syscalls.c Seperate the export check in VFS_FHTOVP, exports are now checked via 1999-09-11 00:46:08 +00:00
vfs_vnops.c This is what was "fdfix2.patch," a fix for fd sharing. It's pretty 1999-09-19 17:00:25 +00:00
vnode_if.pl $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
vnode_if.sh $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
vnode_if.src $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00