tidied up ChangeLogs (80 character line width), added reference
[deliverable/binutils-gdb.git] / gdb / mingw-hdep.c
index 79b23dc2556b65669676678069298d81cb0a69c0..bb0f50aaa46f59e17d0a59d017d11bf41df44098 100644 (file)
@@ -167,6 +167,10 @@ gdb_select (int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
   for (fd = 0, indx = 0; fd < n; ++fd)
     {
       HANDLE fd_h;
+      struct serial *scb;
+
+      if (!FD_ISSET (fd, readfds) && !FD_ISSET (fd, writefds))
+       continue;
 
       if (FD_ISSET (fd, readfds))
        {
@@ -189,6 +193,12 @@ gdb_select (int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
          else
            num_ready++;
        }
+
+      /* We created at least one event handle for this fd.  Let the
+        device know we are finished with it.  */
+      scb = serial_for_fd (fd);
+      if (scb)
+       serial_done_wait_handle (scb);
     }
 
   return num_ready;
This page took 0.023601 seconds and 4 git commands to generate.