From: sos AT prospect DOT com DOT ru (Sergey Okhapkin) Subject: RE: New snapshot 26 Nov 1998 08:42:47 -0800 Message-ID: <01BE192F.D8DEA5E0.cygnus.cygwin32.developers@sos> To: "'Christopher Faylor'" Cc: "'cygwin32-developers AT cygnus DOT com'" Christopher Faylor wrote: > Sergey has reported a couple of problems with this snapshot: > > 1) gcc -pipe has a 10% performance loss. > Here is my temporary fix - peek a handle before checking for a signal. --- select.cc.orig Thu Nov 26 10:16:07 1998 +++ select.cc Thu Nov 26 11:21:23 1998 @@ -79,16 +79,15 @@ #define MAKEready(what) \ int \ fhandler_##what::ready_for_read (DWORD howlong, int) \ { \ select_record me (this); \ (void) select_read (&me); \ - do \ + while (!peek_##what (&me) && howlong == INFINITE) \ if (WaitForSingleObject (signal_arrived, 10) == WAIT_OBJECT_0) \ break; \ - while (!peek_##what (&me) && howlong == INFINITE); \ return me.read_ready; \ } /* * The main select code. The fd_set pointers here are not taken as * given as we are not sure how large the fd_set arrays are in the client code. -- Sergey Okhapkin, http://www.lexa.ru/sos Piscataway, NJ