www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1998/11/26/08:42:47

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'" <cgf AT cygnus DOT com>
Cc: "'cygwin32-developers AT cygnus DOT com'" <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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019