The NetBSD Project

CVS log for src/sys/kern/sys_descrip.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / kern

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.33.2.1: download - view: text, markup, annotated - select for diffs
Wed Nov 20 14:01:59 2024 UTC (8 weeks, 2 days ago) by martin
Branches: netbsd-9
Diff to: previous 1.33: preferred, colored; next MAIN 1.34: preferred, colored
Changes since revision 1.33: +5 -3 lines
Pull up following revision(s) (requested by riastradh in ticket #1921):

	sys/kern/kern_event.c: revision 1.106
	sys/kern/sys_select.c: revision 1.51
	sys/kern/subr_exec_fd.c: revision 1.10
	sys/kern/sys_aio.c: revision 1.46
	sys/kern/kern_descrip.c: revision 1.244
	sys/kern/kern_descrip.c: revision 1.245
	sys/ddb/db_xxx.c: revision 1.72
	sys/ddb/db_xxx.c: revision 1.73
	sys/miscfs/fdesc/fdesc_vnops.c: revision 1.132
	sys/kern/uipc_usrreq.c: revision 1.195
	sys/kern/sys_descrip.c: revision 1.36
	sys/kern/uipc_usrreq.c: revision 1.196
	sys/kern/uipc_socket2.c: revision 1.135
	sys/kern/uipc_socket2.c: revision 1.136
	sys/kern/kern_sig.c: revision 1.383
	sys/kern/kern_sig.c: revision 1.384
	sys/compat/netbsd32/netbsd32_ioctl.c: revision 1.107
	sys/miscfs/procfs/procfs_vnops.c: revision 1.208
	sys/kern/subr_exec_fd.c: revision 1.9
	sys/kern/kern_descrip.c: revision 1.252
	(all via patch)

Load struct filedesc::fd_dt with atomic_load_consume.

Exceptions: when fd_refcnt <= 1, or when holding fd_lock.

While here:
- Restore KASSERT(mutex_owned(&fdp->fd_lock)) in fd_unused.
  => This is used only in fd_close and fd_abort, where it holds.
- Move bounds check assertion in fd_putfile to where it matters.
- Store fd_dt with atomic_store_release.
- Move load of fd_dt under lock in knote_fdclose.
- Omit membar_consumer in fdesc_readdir.
  => atomic_load_consume serves the same purpose now.
  => Was needed only on alpha anyway.

Load struct fdfile::ff_file with atomic_load_consume.
Exceptions: when we're only testing whether it's there, not about to
dereference it.

Note: We do not use atomic_store_release to set it because the
preceding mutex_exit should be enough.

(That said, it's not clear the mutex_enter/exit is needed unless
refcnt > 0 already, in which case maybe it would be a win to switch
from the membar implied by mutex_enter to the membar implied by
atomic_store_release -- which I would generally expect to be much
cheaper.  And a little clearer without a long comment.)
kern_descrip.c: Fix membars around reference count decrement.

In general, the `last one out hit the lights' style of reference
counting (as opposed to the `whoever's destroying must wait for
pending users to finish' style) requires memory barriers like so:

        ... usage of resources associated with object ...
        membar_release();
        if (atomic_dec_uint_nv(&obj->refcnt) != 0)
                return;
        membar_acquire();
        ... freeing of resources associated with object ...

This way, all usage happens-before all freeing.  This fixes several
errors:
- fd_close failed to ensure whatever its caller did would
  happen-before the freeing, in the case where another thread is
  concurrently trying to close the fd (ff->ff_file == NULL).
  Fix: Add membar_release before atomic_dec_uint(&ff->ff_refcnt) in
  that branch.
- fd_close failed to ensure all loads its caller had issued will have
  happened-before the freeing, in the case where the fd is still in
  use by another thread (fdp->fd_refcnt > 1 and ff->ff_refcnt-- > 0).
  Fix: Change membar_producer to membar_release before
  atomic_dec_uint(&ff->ff_refcnt).
- fd_close failed to ensure that any usage of fp by other callers
  would happen-before any freeing it does.
  Fix: Add membar_acquire after atomic_dec_uint_nv(&ff->ff_refcnt).
- fd_free failed to ensure that any usage of fdp by other callers
  would happen-before any freeing it does.
  Fix: Add membar_acquire after atomic_dec_uint_nv(&fdp->fd_refcnt).

While here, change membar_exit -> membar_release.  No semantic
change, just updating away from the legacy API.

Revision 1.51: download - view: text, markup, annotated - select for diffs
Mon May 20 09:37:34 2024 UTC (7 months, 4 weeks ago) by martin
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, HEAD
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +3 -3 lines
Fix a few oversights from the renaming of dup3110 to dup3100

Revision 1.50: download - view: text, markup, annotated - select for diffs
Sun May 19 22:25:48 2024 UTC (7 months, 4 weeks ago) by christos
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +3 -3 lines
version dup3

Revision 1.49: download - view: text, markup, annotated - select for diffs
Sun May 19 15:56:55 2024 UTC (8 months ago) by christos
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +4 -2 lines
PR/58266: Collin Funk: Fail if from == to, like FreeBSD and Linux. The test
is done in dup3 before any other tests so even if a bad descriptor it is
passed we will return EINVAL not EBADFD like Linux does.

Revision 1.48: download - view: text, markup, annotated - select for diffs
Mon Jul 10 02:31:55 2023 UTC (18 months, 1 week ago) by christos
Branches: MAIN
CVS tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +27 -23 lines
Add memfd_create(2) from GSoC 2023 by Theodore Preduta

Revision 1.47: download - view: text, markup, annotated - select for diffs
Sun May 14 09:29:58 2023 UTC (20 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +3 -3 lines
kern/sys_descrip.c: Nix trailing whitespace.

Revision 1.46: download - view: text, markup, annotated - select for diffs
Sat Apr 22 14:23:59 2023 UTC (20 months, 4 weeks ago) by riastradh
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +3 -2 lines
fcntl(2), flock(2): Assert FHASLOCK is clear if no fo_advlock.

Revision 1.45: download - view: text, markup, annotated - select for diffs
Sat Apr 22 14:23:50 2023 UTC (20 months, 4 weeks ago) by riastradh
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +19 -14 lines
fcntl(2), flock(2): Unify error branches.

Let's make this a bit less error-prone by having everything converge
in the same place instead of multiple returns in different contexts.

Revision 1.44: download - view: text, markup, annotated - select for diffs
Sat Apr 22 14:23:32 2023 UTC (20 months, 4 weeks ago) by riastradh
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +12 -8 lines
fcntl(2), flock(2): Fix missing fd_putfile in error branch.

Oops!

Revision 1.43: download - view: text, markup, annotated - select for diffs
Sat Apr 22 13:53:02 2023 UTC (20 months, 4 weeks ago) by riastradh
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +8 -89 lines
file(9): New fo_posix_fadvise operation.

XXX kernel revbump -- changes struct fileops API and ABI

Revision 1.42: download - view: text, markup, annotated - select for diffs
Sat Apr 22 13:52:54 2023 UTC (20 months, 4 weeks ago) by riastradh
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +10 -30 lines
file(9): New fo_fpathconf operation.

XXX kernel revbump -- struct fileops API and ABI change

Revision 1.41: download - view: text, markup, annotated - select for diffs
Sat Apr 22 13:52:46 2023 UTC (20 months, 4 weeks ago) by riastradh
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +19 -23 lines
file(9): New fo_advlock operation.

This moves the vnode-specific logic from sys_descrip.c into
vfs_vnode.c, like we did for fo_seek.

XXX kernel revbump -- struct fileops API and ABI change

Revision 1.40: download - view: text, markup, annotated - select for diffs
Sat Apr 16 07:59:02 2022 UTC (2 years, 9 months ago) by hannken
Branches: MAIN
CVS tags: netbsd-10-base, netbsd-10-1-RELEASE, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +4 -2 lines
Lock vnode for VOP_PATHCONF().

Revision 1.39: download - view: text, markup, annotated - select for diffs
Tue Mar 15 10:37:42 2022 UTC (2 years, 10 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +7 -6 lines
posix_fadvise(2): Detect arithmetic overflow without UB.

Reported-by: syzbot+18f01abff11bd527c464@syzkaller.appspotmail.com

Revision 1.38: download - view: text, markup, annotated - select for diffs
Sat Sep 11 10:09:13 2021 UTC (3 years, 4 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +6 -3 lines
sys/kern: Avoid fp->f_offset without the object (here, vnode) lock.

Revision 1.31.4.3: download - view: text, markup, annotated - select for diffs
Mon Apr 13 08:05:04 2020 UTC (4 years, 9 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.31.4.2: preferred, colored; branchpoint 1.31: preferred, colored; next MAIN 1.32: preferred, colored
Changes since revision 1.31.4.2: +33 -15 lines
Mostly merge changes from HEAD upto 20200411

Revision 1.31.4.2: download - view: text, markup, annotated - select for diffs
Wed Apr 8 14:08:52 2020 UTC (4 years, 9 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.31.4.1: preferred, colored; branchpoint 1.31: preferred, colored
Changes since revision 1.31.4.1: +7 -5 lines
Merge changes from current as of 20200406

Revision 1.35.2.1: download - view: text, markup, annotated - select for diffs
Sat Feb 29 20:21:03 2020 UTC (4 years, 10 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.35: preferred, colored; next MAIN 1.36: preferred, colored
Changes since revision 1.35: +7 -5 lines
Sync with head.

Revision 1.37: download - view: text, markup, annotated - select for diffs
Sun Feb 23 15:46:41 2020 UTC (4 years, 10 months ago) by ad
Branches: MAIN
CVS tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +4 -4 lines
UVM locking changes, proposed on tech-kern:

- Change the lock on uvm_object, vm_amap and vm_anon to be a RW lock.
- Break v_interlock and vmobjlock apart.  v_interlock remains a mutex.
- Do partial PV list locking in the x86 pmap.  Others to follow later.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Sat Feb 1 02:23:04 2020 UTC (4 years, 11 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +5 -3 lines
Load struct filedesc::fd_dt with atomic_load_consume.

Exceptions: when fd_refcnt <= 1, or when holding fd_lock.

While here:

- Restore KASSERT(mutex_owned(&fdp->fd_lock)) in fd_unused.
  => This is used only in fd_close and fd_abort, where it holds.
- Move bounds check assertion in fd_putfile to where it matters.
- Store fd_dt with atomic_store_release.
- Move load of fd_dt under lock in knote_fdclose.
- Omit membar_consumer in fdesc_readdir.
  => atomic_load_consume serves the same purpose now.
  => Was needed only on alpha anyway.

Revision 1.35: download - view: text, markup, annotated - select for diffs
Sun Sep 15 16:25:57 2019 UTC (5 years, 4 months ago) by christos
Branches: MAIN
CVS tags: phil-wifi-20191119, ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +32 -17 lines
Add F_GETPATH, presented to tech-kern.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Mon Aug 26 10:19:08 2019 UTC (5 years, 4 months ago) by maxv
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +5 -2 lines
Reject negative offsets, to prevent panics later in genfs_getpages().

Revision 1.31.4.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:09:03 2019 UTC (5 years, 7 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +8 -6 lines
Sync with HEAD

Revision 1.33: download - view: text, markup, annotated - select for diffs
Tue May 21 18:09:31 2019 UTC (5 years, 8 months ago) by christos
Branches: MAIN
CVS tags: phil-wifi-20190609, netbsd-9-base, netbsd-9-4-RELEASE, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1
Branch point for: netbsd-9
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +7 -6 lines
provide more info about who is getting ERESTART.

Revision 1.32: download - view: text, markup, annotated - select for diffs
Sun Feb 3 03:19:28 2019 UTC (5 years, 11 months ago) by mrg
Branches: MAIN
CVS tags: isaki-audio2-base, isaki-audio2
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +3 -2 lines
- add or adjust /* FALLTHROUGH */ where appropriate
- add __unreachable() after functions that can return but won't in
  this case, and thus can't be marked __dead easily

Revision 1.31: download - view: text, markup, annotated - select for diffs
Tue Dec 26 08:30:58 2017 UTC (7 years ago) by kamil
Branches: MAIN
CVS tags: phil-wifi-base, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat
Branch point for: phil-wifi
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +13 -6 lines
Refactor pipe1() and correct a bug in sys_pipe2() (SYS_pipe2)

sys_pipe2() returns two integers (values), the 2nd one is a copy of the 2nd
file descriptor that lands in fildes[2]. This is a side effect of reusing
the code for sys_pipe() (SYS_pipe) and not cleaning it up.

The first returned value is (on success) 0.

Introduced a small refactoring in pipe1() that it does not operate over
retval[], but on an array int[2]. A user sets retval[] for pipe() when
desired and needed.

This refactoring touches compat code: netbsd32, linux, linux32.

Before the changes on NetBSD/amd64:

$ ktruss -i ./a.out
[...]
 15131      1 a.out    pipe2(0x7f7fff2e62b8, 0)    = 0, 4
[...]

After the changes:

$ ktruss -i ./a.out
[...]
   782      1 a.out    pipe2(0x7f7fff97e850, 0)    = 0
[...]

There should not be a visible change for current users.

Sponsored by <The NetBSD Foundation>

Revision 1.27.2.3: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:38:45 2017 UTC (7 years, 1 month ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.27.2.2: preferred, colored; branchpoint 1.27: preferred, colored; next MAIN 1.28: preferred, colored
Changes since revision 1.27.2.2: +11 -11 lines
update from HEAD

Revision 1.30: download - view: text, markup, annotated - select for diffs
Fri Sep 5 09:20:59 2014 UTC (10 years, 4 months ago) by matt
Branches: MAIN
CVS tags: tls-maxphys-base-20171202, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base, nick-nhusb, netbsd-8-base, netbsd-8-3-RELEASE, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +8 -8 lines
Try not to use f_data, use f_{vnode,socket,pipe,mqueue,kqueue,ksem} to get
a correctly typed pointer.

Revision 1.29: download - view: text, markup, annotated - select for diffs
Fri Sep 5 05:57:21 2014 UTC (10 years, 4 months ago) by matt
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +8 -8 lines
Don't next structure and enum definitions.
Don't use C++ keywords new, try, class, private, etc.

Revision 1.23.2.3: download - view: text, markup, annotated - select for diffs
Thu May 22 11:41:03 2014 UTC (10 years, 8 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.23.2.2: preferred, colored; branchpoint 1.23: preferred, colored; next MAIN 1.24: preferred, colored
Changes since revision 1.23.2.2: +2 -4 lines
sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.27.2.2: download - view: text, markup, annotated - select for diffs
Sun Jun 23 06:18:58 2013 UTC (11 years, 6 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.27.2.1: preferred, colored; branchpoint 1.27: preferred, colored
Changes since revision 1.27.2.1: +2 -4 lines
resync from head

Revision 1.28: download - view: text, markup, annotated - select for diffs
Mon Apr 8 21:12:33 2013 UTC (11 years, 9 months ago) by skrll
Branches: MAIN
CVS tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, rmind-smpnet-nbase, rmind-smpnet-base, rmind-smpnet, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, khorben-n900
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +2 -4 lines
Remove some set but unused variables

Revision 1.7.4.2: download - view: text, markup, annotated - select for diffs
Tue Nov 6 20:07:33 2012 UTC (12 years, 2 months ago) by riz
Branches: netbsd-5
CVS tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2
Diff to: previous 1.7.4.1: preferred, colored; branchpoint 1.7: preferred, colored; next MAIN 1.8: preferred, colored
Changes since revision 1.7.4.1: +5 -3 lines
Pull up following revision(s) (requested by he in ticket #1815):
	sys/kern/sys_descrip.c: revision 1.11
Fix the posix_fadvise return value... finally.
Tested martin on sparc64/m68k and me on hppa.

Revision 1.23.2.2: download - view: text, markup, annotated - select for diffs
Tue Oct 30 17:22:34 2012 UTC (12 years, 2 months ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.23.2.1: preferred, colored; branchpoint 1.23: preferred, colored
Changes since revision 1.23.2.1: +14 -3 lines
sync with head

Revision 1.27.2.1: download - view: text, markup, annotated - select for diffs
Wed Sep 12 06:15:34 2012 UTC (12 years, 4 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +5 -3 lines
Initial snapshot of work to eliminate 64K MAXPHYS.  Basically works for
physio (I/O to raw devices); needs more doing to get it going with the
filesystems, but it shouldn't damage data.

All work's been done on amd64 so far.  Not hard to add support to other
ports.  If others want to pitch in, one very helpful thing would be to
sort out when and how IDE disks can do 128K or larger transfers, and
adjust the various PCI IDE (or at least ahcisata) drivers and wd.c
accordingly -- it would make testing much easier.  Another very helpful
thing would be to implement a smart minphys() for RAIDframe along the
lines detailed in the MAXPHYS-NOTES file.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Sun Aug 5 04:26:10 2012 UTC (12 years, 5 months ago) by riastradh
Branches: MAIN
CVS tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, agc-symver-base, agc-symver
Branch point for: tls-maxphys
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +14 -3 lines
Force sys_close not to restart by returning ERESTART.

Print a diagnostic message if we ever get ERESTART out of fd_close
and convert it to EINTR instead.

Even if fd_close fails, it has already closed the file descriptor, so
restarting the system call is a mistake, with dangerous consequences
for multithreaded programs.

Should probably turn the message into a kassert eventually, and maybe
add one deeper in fd_close in order to more easily debug it before
all the data structures are destroyed.

Revision 1.23.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:08:28 2012 UTC (12 years, 9 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +15 -3 lines
sync with head

Revision 1.23.6.1: download - view: text, markup, annotated - select for diffs
Sat Feb 18 07:35:33 2012 UTC (12 years, 11 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.23: preferred, colored; next MAIN 1.24: preferred, colored
Changes since revision 1.23: +15 -3 lines
merge to -current.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Sat Feb 11 23:16:17 2012 UTC (12 years, 11 months ago) by martin
Branches: MAIN
CVS tags: yamt-pagecache-base5, yamt-pagecache-base4, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base10
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +3 -3 lines
Add a posix_spawn syscall, as discussed on tech-kern.
Based on the summer of code project by Charles Zhang, heavily reworked
later by me - all bugs are likely mine.
Ok: core, releng.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Wed Jan 25 14:04:09 2012 UTC (12 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +4 -4 lines
Add locking, requested by yamt. Note that locking is not used everywhere
for these.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Wed Jan 25 00:28:36 2012 UTC (12 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +14 -2 lines
As discussed in tech-kern, provide the means to prevent delivery of SIGPIPE
on EPIPE for all file descriptor types:

- provide O_NOSIGPIPE for open,kqueue1,pipe2,dup3,fcntl(F_{G,S}ETFL) [NetBSD]
- provide SOCK_NOSIGPIPE for socket,socketpair [NetBSD]
- provide SO_NOSIGPIPE for {g,s}seckopt [NetBSD/FreeBSD/MacOSX]
- provide F_{G,S}ETNOSIGPIPE for fcntl [MacOSX]

Revision 1.23: download - view: text, markup, annotated - select for diffs
Mon Oct 31 21:31:29 2011 UTC (13 years, 2 months ago) by christos
Branches: MAIN
CVS tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache, jmcneill-usbmp
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +6 -3 lines
PR/45545 Yui NARUSE: pipe2's return value is wrong

Revision 1.22: download - view: text, markup, annotated - select for diffs
Sun Jun 26 16:42:42 2011 UTC (13 years, 6 months ago) by christos
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +62 -23 lines
* Arrange for interfaces that create new file descriptors to be able to
  set close-on-exec on creation (http://udrepper.livejournal.com/20407.html).

    - Add F_DUPFD_CLOEXEC to fcntl(2).
    - Add MSG_CMSG_CLOEXEC to recvmsg(2) for unix file descriptor passing.
    - Add dup3(2) syscall with a flags argument for O_CLOEXEC, O_NONBLOCK.
    - Add pipe2(2) syscall with a flags argument for O_CLOEXEC, O_NONBLOCK.
    - Add flags SOCK_CLOEXEC, SOCK_NONBLOCK to the socket type parameter
      for socket(2) and socketpair(2).
    - Add new paccept(2) syscall that takes an additional sigset_t to alter
      the sigmask temporarily and a flags argument to set SOCK_CLOEXEC,
      SOCK_NONBLOCK.
    - Add new mode character 'e' to fopen(3) and popen(3) to open pipes
      and file descriptors for close on exec.
    - Add new kqueue1(2) syscall with a new flags argument to open the
      kqueue file descriptor with O_CLOEXEC, O_NONBLOCK.

* Fix the system calls that take socklen_t arguments to actually do so.

* Don't include userland header files (signal.h) from system header files
  (rump_syscallargs.h).

* Bump libc version for the new syscalls.

Revision 1.20.2.1: download - view: text, markup, annotated - select for diffs
Thu Jun 23 14:20:20 2011 UTC (13 years, 6 months ago) by cherry
Branches: cherry-xenmp
Diff to: previous 1.20: preferred, colored; next MAIN 1.21: preferred, colored
Changes since revision 1.20: +3 -3 lines
Catchup with rmind-uvmplock merge.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Sun Jun 12 03:35:56 2011 UTC (13 years, 7 months ago) by rmind
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +3 -3 lines
Welcome to 5.99.53!  Merge rmind-uvmplock branch:

- Reorganize locking in UVM and provide extra serialisation for pmap(9).
  New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
  the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
  Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
  kernel-lock on some ports).  Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.

Revision 1.19.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 6 09:09:36 2011 UTC (13 years, 7 months ago) by jruoho
Branches: jruoho-x86intr
Diff to: previous 1.19: preferred, colored; next MAIN 1.20: preferred, colored
Changes since revision 1.19: +5 -11 lines
Sync with HEAD.

Revision 1.17.4.3: download - view: text, markup, annotated - select for diffs
Thu Apr 21 01:42:09 2011 UTC (13 years, 9 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.17.4.2: preferred, colored; branchpoint 1.17: preferred, colored; next MAIN 1.18: preferred, colored
Changes since revision 1.17.4.2: +3 -9 lines
sync with head

Revision 1.20: download - view: text, markup, annotated - select for diffs
Sun Apr 10 15:45:33 2011 UTC (13 years, 9 months ago) by christos
Branches: MAIN
CVS tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base
Branch point for: cherry-xenmp
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +5 -11 lines
- Add O_CLOEXEC to open(2)
- Add fd_set_exclose() to encapsulate uses of FIO{,N}CLEX, O_CLOEXEC, F{G,S}ETFD
- Add a pipe1() function to allow passing flags to the fd's that pipe(2)
  opens to ease implementation of linux pipe2(2)
- Factor out fp handling code from open(2) and fhopen(2)

Revision 1.17.4.2: download - view: text, markup, annotated - select for diffs
Sat Mar 5 20:55:21 2011 UTC (13 years, 10 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.17.4.1: preferred, colored; branchpoint 1.17: preferred, colored
Changes since revision 1.17.4.1: +21 -8 lines
sync with head

Revision 1.19: download - view: text, markup, annotated - select for diffs
Sat Dec 18 01:18:48 2010 UTC (14 years, 1 month ago) by rmind
Branches: MAIN
CVS tags: matt-mips64-premerge-20101231, jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: jruoho-x86intr
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +19 -7 lines
do_posix_fadvise: fix and improve previous change - add a comment with
some rationale and handle few range overflows.

Per report/discussion with yamt@.

Revision 1.17.2.1: download - view: text, markup, annotated - select for diffs
Sat Nov 6 08:08:43 2010 UTC (14 years, 2 months ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.17: preferred, colored; next MAIN 1.18: preferred, colored
Changes since revision 1.17: +6 -5 lines
Sync with HEAD.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Wed Oct 27 02:58:04 2010 UTC (14 years, 2 months ago) by rmind
Branches: MAIN
CVS tags: uebayasi-xip-base4
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +6 -5 lines
do_posix_fadvise: check for a negative length; truncate the offset and
round the end-offset, not vice-versa.

Thanks to jakllsch@ for debug info.

Revision 1.17.4.1: download - view: text, markup, annotated - select for diffs
Tue Mar 16 15:38:09 2010 UTC (14 years, 10 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +3 -3 lines
Change struct uvm_object::vmobjlock to be dynamically allocated with
mutex_obj_alloc().  It allows us to share the locks among UVM objects.

Revision 1.2.2.4: download - view: text, markup, annotated - select for diffs
Thu Mar 11 15:04:19 2010 UTC (14 years, 10 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.2.2.3: preferred, colored; branchpoint 1.2: preferred, colored; next MAIN 1.3: preferred, colored
Changes since revision 1.2.2.3: +11 -7 lines
sync with head

Revision 1.17: download - view: text, markup, annotated - select for diffs
Wed Oct 28 18:24:44 2009 UTC (15 years, 2 months ago) by njoly
Branches: MAIN
CVS tags: yamt-nfs-mp-base9, yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1, uebayasi-xip-base, matt-premerge-20091211, jym-xensuspend-nbase
Branch point for: uebayasi-xip, rmind-uvmplock
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +11 -7 lines
Make flock(2) more robust to invalid operation, such as
(LOCK_EX|LOCK_SH).

Revision 1.10.2.2: download - view: text, markup, annotated - select for diffs
Thu Jul 23 23:32:35 2009 UTC (15 years, 5 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.10.2.1: preferred, colored; branchpoint 1.10: preferred, colored; next MAIN 1.11: preferred, colored
Changes since revision 1.10.2.1: +39 -7 lines
Sync with HEAD.

Revision 1.2.2.3: download - view: text, markup, annotated - select for diffs
Sat Jun 20 07:20:31 2009 UTC (15 years, 7 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.2.2.2: preferred, colored; branchpoint 1.2: preferred, colored
Changes since revision 1.2.2.2: +39 -7 lines
sync with head

Revision 1.16: download - view: text, markup, annotated - select for diffs
Wed Jun 10 23:48:10 2009 UTC (15 years, 7 months ago) by yamt
Branches: MAIN
CVS tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, jymxensuspend-base
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +28 -4 lines
do_posix_fadvise:
	- deactivate pages on POSIX_FADV_DONTNEED.
	- more sanity checks.  fix a panic in genfs_getpages
	  introduced by the previous (rev.1.15).

Revision 1.15: download - view: text, markup, annotated - select for diffs
Wed Jun 10 01:56:34 2009 UTC (15 years, 7 months ago) by yamt
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +10 -2 lines
do_posix_fadvise: on POSIX_FADV_WILLNEED, start prefeching of object's pages.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Sun May 31 22:15:13 2009 UTC (15 years, 7 months ago) by yamt
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +5 -5 lines
do_posix_fadvise: turn some KASSERTs into CTASSERTs.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Sun May 24 21:41:26 2009 UTC (15 years, 7 months ago) by ad
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +3 -3 lines
More changes to improve kern_descrip.c.

- Avoid atomics in more places.
- Remove the per-descriptor mutex, and just use filedesc_t::fd_lock.
  It was only being used to synchronize close, and in any case we needed
  to take fd_lock to free the descriptor slot.
- Optimize certain paths for the <NDFDFILE case.
- Sprinkle more comments and assertions.
- Cache more stuff in filedesc_t.
- Fix numerous minor bugs spotted along the way.
- Restructure how the open files array is maintained, for clarity and so
  that we can eliminate the membar_consumer() call in fd_getfile().  This is
  mostly syntactic sugar; the main functional change is that fd_nfiles now
  lives alongside the open file array.

Some measurements with libmicro:

- simple file syscalls are like close() are between 1 to 10% faster.
- some nice improvements, e.g. poll(1000) which is ~50% faster.

Revision 1.10.2.1: download - view: text, markup, annotated - select for diffs
Wed May 13 17:21:57 2009 UTC (15 years, 8 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +6 -4 lines
Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.

Revision 1.2.2.2: download - view: text, markup, annotated - select for diffs
Mon May 4 08:13:48 2009 UTC (15 years, 8 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.2.2.1: preferred, colored; branchpoint 1.2: preferred, colored
Changes since revision 1.2.2.1: +24 -18 lines
sync with head.

Revision 1.7.2.3: download - view: text, markup, annotated - select for diffs
Tue Apr 28 07:37:00 2009 UTC (15 years, 8 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.7.2.2: preferred, colored; branchpoint 1.7: preferred, colored; next MAIN 1.8: preferred, colored
Changes since revision 1.7.2.2: +6 -4 lines
Sync with HEAD.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Sat Mar 28 21:42:19 2009 UTC (15 years, 9 months ago) by rmind
Branches: MAIN
CVS tags: yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jym-xensuspend-base
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +3 -3 lines
sys_fcntl: use FD_CLOEXEC, instead of magic number '1'.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Wed Mar 4 18:11:24 2009 UTC (15 years, 10 months ago) by skrll
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +5 -3 lines
Fix the posix_fadvise return value... finally.

Tested martin on sparc64/m68k and me on hppa.

Revision 1.7.2.2: download - view: text, markup, annotated - select for diffs
Tue Mar 3 18:32:56 2009 UTC (15 years, 10 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.7.2.1: preferred, colored; branchpoint 1.7: preferred, colored
Changes since revision 1.7.2.1: +3 -3 lines
Sync with HEAD.

Revision 1.7.4.1: download - view: text, markup, annotated - select for diffs
Mon Feb 2 02:53:51 2009 UTC (15 years, 11 months ago) by snj
Branches: netbsd-5
CVS tags: netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +8 -3 lines
Pull up following revision(s) (requested by ad in ticket #341):
	sys/kern/sys_descrip.c: revision 1.8
Prevent a potential deadlock from a multithreaded process doing:
t1	dup2(0, 1)
t2	dup2(1, 0)

Revision 1.10: download - view: text, markup, annotated - select for diffs
Thu Jan 22 14:38:35 2009 UTC (15 years, 11 months ago) by yamt
Branches: MAIN
CVS tags: nick-hppapmap-base2
Branch point for: jym-xensuspend
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +3 -3 lines
malloc -> kmem_alloc

Revision 1.7.2.1: download - view: text, markup, annotated - select for diffs
Mon Jan 19 13:19:39 2009 UTC (16 years ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +9 -4 lines
Sync with HEAD.

Revision 1.1.6.7: download - view: text, markup, annotated - select for diffs
Sat Jan 17 13:29:20 2009 UTC (16 years ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.1.6.6: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.6.6: +7 -2 lines
Sync with HEAD.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Sun Jan 11 02:45:52 2009 UTC (16 years ago) by christos
Branches: MAIN
CVS tags: mjf-devfs2-base
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +3 -3 lines
merge christos-time_t

Revision 1.1.4.3: download - view: text, markup, annotated - select for diffs
Sat Dec 27 23:14:24 2008 UTC (16 years ago) by christos
Branches: christos-time_t
Diff to: previous 1.1.4.2: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.4.2: +8 -3 lines
merge with head.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Sun Dec 21 10:25:00 2008 UTC (16 years, 1 month ago) by ad
Branches: MAIN
CVS tags: christos-time_t-nbase, christos-time_t-base
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +8 -3 lines
Prevent a potential deadlock from a multithreaded process doing:

t1	dup2(0, 1)
t2	dup2(1, 0)

Revision 1.1.4.2: download - view: text, markup, annotated - select for diffs
Sat Nov 1 21:22:27 2008 UTC (16 years, 2 months ago) by christos
Branches: christos-time_t
Diff to: previous 1.1.4.1: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.4.1: +16 -24 lines
Sync with head.

Revision 1.5.2.1: download - view: text, markup, annotated - select for diffs
Sun Oct 19 22:17:28 2008 UTC (16 years, 3 months ago) by haad
Branches: haad-dm
Diff to: previous 1.5: preferred, colored; next MAIN 1.6: preferred, colored
Changes since revision 1.5: +4 -4 lines
Sync with HEAD.

Revision 1.1.6.6: download - view: text, markup, annotated - select for diffs
Sun Sep 28 10:40:53 2008 UTC (16 years, 3 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.1.6.5: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.6.5: +2 -2 lines
Sync with HEAD.

Revision 1.3.2.2: download - view: text, markup, annotated - select for diffs
Wed Sep 24 16:38:57 2008 UTC (16 years, 3 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.3.2.1: preferred, colored; branchpoint 1.3: preferred, colored; next MAIN 1.4: preferred, colored
Changes since revision 1.3.2.1: +3 -3 lines
Merge in changes between wrstuden-revivesa-base-2 and
wrstuden-revivesa-base-3.

Revision 1.3.2.1: download - view: text, markup, annotated - select for diffs
Thu Sep 18 04:31:43 2008 UTC (16 years, 4 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +11 -12 lines
Sync with wrstuden-revivesa-base-2.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Mon Sep 15 18:12:56 2008 UTC (16 years, 4 months ago) by rmind
Branches: MAIN
CVS tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, netbsd-5-base, netbsd-5-0-RC1, matt-mips64-base2, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, netbsd-5
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +3 -3 lines
Replace intptr_t with uintptr_t in few more places.
OK by <matt>.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Sun Aug 31 20:55:55 2008 UTC (16 years, 4 months ago) by njoly
Branches: MAIN
CVS tags: wrstuden-revivesa-base-2
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +3 -3 lines
Make dup(2) return the correct error value, not 0.

Revision 1.3.4.2: download - view: text, markup, annotated - select for diffs
Thu Jul 3 18:38:12 2008 UTC (16 years, 6 months ago) by simonb
Branches: simonb-wapbl
Diff to: previous 1.3.4.1: preferred, colored; branchpoint 1.3: preferred, colored; next MAIN 1.4: preferred, colored
Changes since revision 1.3.4.1: +7 -7 lines
Sync with head.

Revision 1.1.6.5: download - view: text, markup, annotated - select for diffs
Wed Jul 2 19:08:20 2008 UTC (16 years, 6 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.1.6.4: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.6.4: +5 -5 lines
Sync with HEAD.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Wed Jul 2 16:45:20 2008 UTC (16 years, 6 months ago) by matt
Branches: MAIN
CVS tags: simonb-wapbl-nbase, simonb-wapbl-base
Branch point for: haad-dm
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +7 -7 lines
Change {ff,fd}_exclose and ff_allocated to bool.  Change exclose arg to
fd_dup to bool.  Switch assignments from 1/0 to true/false.

This make alpha kernels compile.  Bump kern to 4.99.69 since structure
changed.

Revision 1.1.6.4: download - view: text, markup, annotated - select for diffs
Sun Jun 29 09:33:14 2008 UTC (16 years, 6 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.1.6.3: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.6.3: +3 -4 lines
Sync with HEAD.

Revision 1.3.4.1: download - view: text, markup, annotated - select for diffs
Fri Jun 27 15:11:39 2008 UTC (16 years, 6 months ago) by simonb
Branches: simonb-wapbl
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +5 -6 lines
Sync with head.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Mon Jun 23 11:26:53 2008 UTC (16 years, 6 months ago) by ad
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +5 -6 lines
sys_fcntl: use l_fd, not p_fd.

Revision 1.1.6.3: download - view: text, markup, annotated - select for diffs
Mon Jun 2 13:24:11 2008 UTC (16 years, 7 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.1.6.2: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.6.2: +4 -11 lines
Sync with HEAD.

Revision 1.1.8.1: download - view: text, markup, annotated - select for diffs
Sun May 18 12:35:10 2008 UTC (16 years, 8 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1: +6 -13 lines
sync with head.

Revision 1.2.2.1: download - view: text, markup, annotated - select for diffs
Fri May 16 02:25:27 2008 UTC (16 years, 8 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +2 -9 lines
sync with head.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Mon Apr 28 20:24:04 2008 UTC (16 years, 8 months ago) by martin
Branches: MAIN
CVS tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa, simonb-wapbl
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +2 -9 lines
Remove clause 3 and 4 from TNF licenses

Revision 1.2: download - view: text, markup, annotated - select for diffs
Thu Apr 24 18:39:24 2008 UTC (16 years, 8 months ago) by ad
Branches: MAIN
CVS tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +6 -6 lines
Merge proc::p_mutex and proc::p_smutex into a single adaptive mutex, since
we no longer need to guard against access from hardware interrupt handlers.

Additionally, if cloning a process with CLONE_SIGHAND, arrange to have the
child process share the parent's lock so that signal state may be kept in
sync. Partially addresses PR kern/37437.

Revision 1.1.6.2: download - view: text, markup, annotated - select for diffs
Thu Apr 3 12:43:04 2008 UTC (16 years, 9 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.1.6.1: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.6.1: +682 -0 lines
Sync with HEAD.

Revision 1.1.4.1: download - view: text, markup, annotated - select for diffs
Sat Mar 29 20:47:01 2008 UTC (16 years, 9 months ago) by christos
Branches: christos-time_t
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +3 -3 lines
Welcome to the time_t=long long dev_t=uint64_t branch.

Revision 1.1.2.2: download - view: text, markup, annotated - select for diffs
Mon Mar 24 09:39:02 2008 UTC (16 years, 9 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.1.2.1: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.2.1: +682 -0 lines
sync with head.

Revision 1.1.6.1
Fri Mar 21 21:53:35 2008 UTC (16 years, 10 months ago) by mjf
Branches: mjf-devfs2
FILE REMOVED
Changes since revision 1.1: +0 -682 lines
file sys_descrip.c was added on branch mjf-devfs2 on 2008-04-03 12:43:04 +0000

Revision 1.1.2.1
Fri Mar 21 21:53:35 2008 UTC (16 years, 10 months ago) by yamt
Branches: yamt-lazymbuf
FILE REMOVED
Changes since revision 1.1: +0 -682 lines
file sys_descrip.c was added on branch yamt-lazymbuf on 2008-03-24 09:39:02 +0000

Revision 1.1: download - view: text, markup, annotated - select for diffs
Fri Mar 21 21:53:35 2008 UTC (16 years, 10 months ago) by ad
Branches: MAIN
CVS tags: yamt-pf42-baseX, yamt-pf42-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, ad-socklock-base1
Branch point for: yamt-pf42, yamt-lazymbuf, mjf-devfs2, christos-time_t
File descriptor changes, discussed on tech-kern:

- Redo reference counting to be sane.  LWPs accessing files take a short
  term reference on the local file descriptor.  This is the most common
  case.  While a file is in a process descriptor table, a reference is
  held to the file.  The file reference count only changes during control
  operations like open() or close().  Code that comes at files from an
  unusual direction (i.e. foreign to the process) like procfs or sysctl
  takes a reference on the file (f_count), and not on a descriptor.

- Remove knowledge of reference counting and locking from most code that
  deals with files.

- Make the usual case of file descriptor lookup lockless.

- Make kqueue MP and MT safe. PR kern/38098, PR kern/38137.

- Fix numerous file handling bugs, and bugs in the descriptor code that
  affected multithreaded processes.

- Split descriptor system calls out into sys_descrip.c.

- A few stylistic changes: KNF, remove unused casts now that caddr_t is
  gone. Replace dumb gotos with loop control in a few places.

- Don't do redundant pointer passing (struct proc, lwp, filedesc *) unless
  the routine is likely to be inlined.  Most of the time it's about the
  current process.

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>