freebsd-dev/sys/net
John Polstra 81bda851db Make bpf's read timeout feature work more correctly with
select/poll, and therefore with pthreads.  I doubt there is any way
to make this 100% semantically identical to the way it behaves in
unthreaded programs with blocking reads, but the solution here
should do the right thing for all reasonable usage patterns.

The basic idea is to schedule a callout for the read timeout when a
select/poll is done.  When the callout fires, it ends the select if
it is still in progress, or marks the state as "timed out" if the
select has already ended for some other reason.  Additional logic in
bpfread then does the right thing in the case where the timeout has
fired.

Note, I co-opted the bd_state member of the bpf_d structure.  It has
been present in the structure since the initial import of 4.4-lite,
but as far as I can tell it has never been used.

PR:		kern/22063 and bin/31649
MFC after:	3 days
2001-12-14 22:17:54 +00:00
..
bpf_compat.h
bpf_filter.c
bpf.c Make bpf's read timeout feature work more correctly with 2001-12-14 22:17:54 +00:00
bpf.h
bpfdesc.h Make bpf's read timeout feature work more correctly with 2001-12-14 22:17:54 +00:00
bridge.c Whitespace change - replace leading spaces with tabs. 2001-11-24 01:47:50 +00:00
bridge.h MFS: sync the ipfw/dummynet/bridge code with the one recently merged 2001-11-04 22:56:25 +00:00
bsd_comp.c
ethernet.h Don't pass an interface pointer to VLAN_INPUT{,_TAG}. Get it from the 2001-12-03 17:28:27 +00:00
fddi.h
if_arc.h
if_arp.h
if_atm.h
if_atmsubr.c
if_disc.c minor style fix. 2001-12-14 19:28:06 +00:00
if_dl.h
if_ef.c Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
if_ethersubr.c minor style fix. 2001-12-14 19:28:06 +00:00
if_faith.c Pull post-4.4BSD change to sys/net/route.c from BSD/OS 4.2. 2001-10-17 18:07:05 +00:00
if_fddisubr.c
if_gif.c
if_gif.h
if_ieee80211.h
if_iso88025subr.c whitespace fixes. 2001-12-14 19:32:47 +00:00
if_llc.h
if_loop.c whitespace fixes. 2001-12-14 19:32:47 +00:00
if_media.c
if_media.h
if_mib.c The interface index space may be sparsely populated (e.g. when an 2001-10-17 04:12:29 +00:00
if_mib.h
if_ppp.c
if_ppp.h
if_pppvar.h
if_sl.c
if_slvar.h sc_lasttime and sc_starttime are time_t's, not long's. 2001-10-27 20:31:24 +00:00
if_sppp.h
if_spppsubr.c
if_stf.c - malloc should be passed M_WAITOK, not M_WAIT (a mbuf flag) 2001-12-07 01:32:40 +00:00
if_stf.h
if_tap.c whitespace fixes. 2001-12-14 19:32:47 +00:00
if_tap.h
if_tapvar.h
if_tun.c
if_tun.h
if_tunvar.h
if_types.h
if_var.h whitespace fixes. 2001-12-14 19:32:47 +00:00
if_vlan_var.h
if_vlan.c - Utilize the great M_ZERO flag rather than allocating memory then do 2001-11-21 20:29:08 +00:00
if.c Add a SIOCGIFINDEX ioctl, which returns the index of a named interface. 2001-10-17 19:40:44 +00:00
if.h Device Polling code for -current. 2001-12-14 17:56:12 +00:00
intrq.c
intrq.h
iso88025.h
net_osdep.c
net_osdep.h
netisr.h Device Polling code for -current. 2001-12-14 17:56:12 +00:00
pfil.c
pfil.h Remove extra memory region kept by "struct pfil_head pfil_head_t;". 2001-10-22 08:46:23 +00:00
pfkeyv2.h
ppp_comp.h
ppp_deflate.c
ppp_defs.h
ppp_tty.c
radix.c
radix.h
raw_cb.c Give struct socket structures a ref counting interface similar to 2001-11-17 03:07:11 +00:00
raw_cb.h
raw_usrreq.c Give struct socket structures a ref counting interface similar to 2001-11-17 03:07:11 +00:00
route.c Fix a typo in a comment 2001-11-28 16:15:52 +00:00
route.h Introduce a syncache, which enables FreeBSD to withstand a SYN flood 2001-11-22 04:50:44 +00:00
rtsock.c Pull post-4.4BSD change to sys/net/route.c from BSD/OS 4.2. 2001-10-17 18:07:05 +00:00
slcompress.c
slcompress.h
slip.h
zlib.c
zlib.h