delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/08/24/12:11:30

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <430C9C04.4020905@vihmapuu.ee>
Date: Wed, 24 Aug 2005 19:10:44 +0300
From: Raul Metsma <raul AT vihmapuu DOT ee>
User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Problems with Windows threads and cygwin sleep()
X-IsSubscribed: yes

There seems to be some kind issues with cygwin sleep()
and Windows threads.
I created one test program which creates 600 threads
with native windows Sleep(1).
Now when I compile simple c program under cygwin

while(1) { sleep(1); }

and execute it, the first program will eat 100% CPU.

It does not have any problem with Mingw compiled version.
Then I tried compile it under cygwin, using native windows
Sleep() ( Uppercase ) and included w32api/windows.h header,
then it does not have this issue.

I discovered this, using rsync. When I changed rsync sleeps,
with native versions, then there seems to be still same issue.
Maybe cygwin uses inside dll sleep?

I really hope to get this issue fixed

Raul Metsma

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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