Thanks for this code.  I would like to see the nanosleep within
winpthread library.  This has two advantages IMHO.  First, we have
those pure posix-routines within on library.  Additionally we can use
pthread-compatible breakable wait for it.

Btw I was thinking about implementing the nanosleep (and
clock_nanosleep) via the WaitableTimer API provided beginning with
W2k.  It would allow to have a time-resolutine of 100ns, which is a
bit more acurate then the classical ms resolution of 19.2 ms API.  The
only point I am a bit concerned about is "how many waitable timers can
be created within one process?".  Has somebody of you some more
experience with this CreateWaitableTimer API?

Kai

2011/9/2 Dongsheng Song <dongsheng.s...@gmail.com>:
> 于 2011-9-2 14:34, Dongsheng Song 写道:
>> On Fri, Sep 2, 2011 at 14:22, JonY <jo...@users.sourceforge.net> wrote:
>>> Why not, the more code the merrier :)
>>>
>> [
>> 2011-09-02  Dongsheng Song  <dongsh...@users.sourceforge.net>:
>>         * misc/nanosleep.c: New.
>>         * testcases/t_nanosleep.c: New.
>> ]
>>
>> New:
>> mingw-w64-crt/misc/nanosleep.c
>> mingw-w64-crt/testcases/t_nanosleep.c
>>
>> Please update mingw-w64-crt/Makefile.am and mingw-w64-headers/crt/time.h
>> when you want to add these files to mingw-w64-crt.
>>
>> --
>> Dongsheng
> Sorry, I post the old version of nanosleep.c in the previous mail.
>
>
> ------------------------------------------------------------------------------
> Special Offer -- Download ArcSight Logger for FREE!
> Finally, a world-class log management solution at an even better
> price-free! And you'll get a free "Love Thy Logs" t-shirt when you
> download Logger. Secure your free ArcSight Logger TODAY!
> http://p.sf.net/sfu/arcsisghtdev2dev
> _______________________________________________
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
>



-- 
|  (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination

------------------------------------------------------------------------------
Doing More with Less: The Next Generation Virtual Desktop 
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops?   How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to