Up to [cvs.NetBSD.org] / src / sys / kern
Request diff between arbitrary revisions
Default branch: MAIN
Current tag: thorpej-futex2
Revision 1.118 / (download) - annotate - [select for diffs], Sun May 2 19:13:43 2021 UTC (2 years, 11 months ago) by jdolecek
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base,
thorpej-i2c-spi-conf2,
thorpej-i2c-spi-conf-base,
thorpej-futex2-base,
thorpej-futex2,
thorpej-cfargs2-base,
thorpej-cfargs2,
cjep_sun2x-base1,
cjep_sun2x-base,
cjep_sun2x,
cjep_staticlib_x-base1,
cjep_staticlib_x-base,
cjep_staticlib_x
Changes since 1.117: +32 -22
lines
Diff to previous 1.117 (colored)
implement fo_restart hook for kqueue descriptors, so that close(2) on the descriptor won't block indefinitely if other thread is currently blocked on the same kqueue in kevent(2) done similarily to pipes and sockets, i.e. using flag on the potentially shared kqueue structure hooked off file_t - this is somewhat suboptimal if the application dup(2)ped the descriptor, but this should be rare enough to not really matter usually this causes the kevent(2) to end up returning EBADF since on the syscall restart the descriptor is not there anymore; if dup(2)ped the kevent(2) call can continue successfully if the closed kqueue descriptor was other than the one used for the kevent(2) call PR kern/46248 by Julian Fagir