From 0643693198997149e85ece0675d3cf47401ae819 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 11 Jun 1999 14:06:13 +0000 Subject: Patch from Eric Norum to fix bug reported by Ian Lance Taylor : Ian Lance Taylor wrote: > > In rtems-19990528, sbwait sets SB_WAIT in sb_flags. sowakeup checks > it. Why doesn't socket_select set it? > > I don't know that this is a bug--I haven't tried to create a test > case. However, it certainly looks odd. > > Ian Yes, there's a bug there. Sorry about that. It was introduced when I did some cleanup on the sleep/wakeup handling in rtems_glue.c. --- c/src/exec/libnetworking/rtems/rtems_select.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'c/src/exec/libnetworking/rtems') diff --git a/c/src/exec/libnetworking/rtems/rtems_select.c b/c/src/exec/libnetworking/rtems/rtems_select.c index 972bf2d650..2219c145f3 100644 --- a/c/src/exec/libnetworking/rtems/rtems_select.c +++ b/c/src/exec/libnetworking/rtems/rtems_select.c @@ -56,12 +56,14 @@ socket_select (struct socket *so, int which, rtems_id tid) case FREAD: if (soreadable(so)) return (1); + so->so_rcv.sb_flags |= SB_WAIT; so->so_rcv.sb_sel.si_pid = tid; break; case FWRITE: if (sowriteable(so)) return (1); + so->so_rcv.sb_flags |= SB_WAIT; so->so_snd.sb_sel.si_pid = tid; break; -- cgit v1.2.3