From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Juanma Barranquero" Newsgroups: gmane.emacs.devel Subject: Re: 100% CPU on TCP servers (on Windoze). Date: Fri, 14 Jul 2006 14:27:27 +0200 Message-ID: References: <44B76936.4080803@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1152880079 14147 80.91.229.2 (14 Jul 2006 12:27:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 14 Jul 2006 12:27:59 +0000 (UTC) Cc: Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 14 14:27:58 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1G1Mlo-0000aV-LS for ged-emacs-devel@m.gmane.org; Fri, 14 Jul 2006 14:27:49 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G1Mlo-0007gn-3D for ged-emacs-devel@m.gmane.org; Fri, 14 Jul 2006 08:27:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G1MlW-0007gh-PJ for emacs-devel@gnu.org; Fri, 14 Jul 2006 08:27:30 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G1MlU-0007gV-MA for emacs-devel@gnu.org; Fri, 14 Jul 2006 08:27:29 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G1MlU-0007gS-Ez for emacs-devel@gnu.org; Fri, 14 Jul 2006 08:27:28 -0400 Original-Received: from [66.249.92.172] (helo=ug-out-1314.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1G1MnT-0004O0-IZ for emacs-devel@gnu.org; Fri, 14 Jul 2006 08:29:31 -0400 Original-Received: by ug-out-1314.google.com with SMTP id h2so745132ugf for ; Fri, 14 Jul 2006 05:27:27 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=m3On0SRqTPsfRuI1eYdYFKVx0jM+HZsQhZSFlWXFZW02adrdXcFJ70STf5OUFy5c+MjYuaTOvEa7EozYEPk0HADcNeiAYYW9cMSOLn+bDhLqMxtSuynXUUdQdyqCEKLRrOGb8wEIzpAHO0Rql5VBRSPGNbbmJrz1mvpfbvICfkU= Original-Received: by 10.78.193.5 with SMTP id q5mr1645429huf; Fri, 14 Jul 2006 05:27:27 -0700 (PDT) Original-Received: by 10.78.198.12 with HTTP; Fri, 14 Jul 2006 05:27:27 -0700 (PDT) Original-To: "Kim F. Storm" In-Reply-To: Content-Disposition: inline X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:57003 Archived-At: On 7/14/06, Kim F. Storm wrote: > Any idea how to fix that? You can make it work with the attached patch. Apparently, WSAEventSelect is exported from ws2_32.dll but not from wsock32.dll. I don't know whether all targets (I mean, all supported Windows environments) have or use ws2_32.dll, though. Unfortunately, with your patch and the attached one, I still see a 50% CPU use on the reported example. -- /L/e/k/t/u Index: src/w32.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/w32.c,v retrieving revision 1.103 diff -u -2 -r1.103 w32.c --- src/w32.c 14 Jul 2006 09:29:32 -0000 1.103 +++ src/w32.c 14 Jul 2006 12:22:29 -0000 @@ -2771,5 +2771,5 @@ "SetHandleInformation"); - winsock_lib = LoadLibrary ("wsock32.dll"); + winsock_lib = LoadLibrary ("ws2_32.dll"); if (winsock_lib != NULL)