diff options
author | anders <Anders.Persson@Sun.COM> | 2008-12-20 22:46:32 -0800 |
---|---|---|
committer | anders <Anders.Persson@Sun.COM> | 2008-12-20 22:46:32 -0800 |
commit | f0267584ae28753b6da2c2ca09285102868a3f4a (patch) | |
tree | 7e239041e8fde288cbfbe8eebb5cafdbe8251d71 /usr/src/uts/common/sys/socketvar.h | |
parent | 9ad4dd06b7412662d855e0be267b66193dfe7277 (diff) | |
download | illumos-joyent-f0267584ae28753b6da2c2ca09285102868a3f4a.tar.gz |
6787347 dgram_peek sotest fails with unexpected result
6787350 udp_send_zero sotest fails with unexpected result
6787381 SO_POLLEV_ALWAYS flag not inherited from listener
Diffstat (limited to 'usr/src/uts/common/sys/socketvar.h')
-rw-r--r-- | usr/src/uts/common/sys/socketvar.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/usr/src/uts/common/sys/socketvar.h b/usr/src/uts/common/sys/socketvar.h index c4febdf4a2..a0cb12a44c 100644 --- a/usr/src/uts/common/sys/socketvar.h +++ b/usr/src/uts/common/sys/socketvar.h @@ -228,14 +228,14 @@ struct sonode { sodirect_t *so_direct; }; -/* - * We do an initial check for events without holding locks. However, - * if there are no event available, then we redo the check for POLLIN - * events under the lock. - */ #define SO_HAVE_DATA(so) \ - ((so)->so_rcv_timer_tid == 0 && (so->so_rcv_queued > 0)) || \ - ((so)->so_rcv_queued > (so)->so_rcv_thresh) || \ + /* \ + * For the (tid == 0) case we must check so_rcv_{q_,}head \ + * rather than (so_rcv_queued > 0), since the latter does not \ + * take into account mblks with only control/name information. \ + */ \ + ((so)->so_rcv_timer_tid == 0 && ((so)->so_rcv_head != NULL || \ + (so)->so_rcv_q_head != NULL)) || \ ((so)->so_state & SS_CANTRCVMORE) /* |