[Pachi] Pachi windows build

Petr Baudis pasky at ucw.cz
Tue Jan 3 17:29:40 CET 2012


  Hi!

  Thanks a lot for looking into this!

  The functions missing are not that important, so there is no need for
a full equivalent, I think.

On Tue, Jan 03, 2012 at 04:53:44PM +0200, Paul wrote:
> > There does exist InetNtop in Winsock, see here
> > http://msdn.microsoft.com/en-us/library/windows/desktop/cc805843(v=VS.85).aspx
> Yes, there is, but MinGW doesn't include it in their header files. This
> means you should be able to rename it and have it build, but I'll have
> to rewrite it, I think. Unless I can somehow build with MinGW and link
> to the VS header files, but I don't think that is really a good
> solution.
> 
> Does anybody out there know of any open source code to do this?

  This function is used only for logging slave replies in distributed
mode. I think it's fine to just not print the IP address if the function
is not available.

> > Searching through the codebase, I see there's two calls to sleep,
> > time_sleep(u->stats_delay); where stats_delay is set to 10ms by
> > default, and time_sleep(TREE_BUSYWAIT_INTERVAL); where
> > TREE_BUSYWAIT_INTERVAL == 100ms. Since the times are this high, I
> > assume the actual times they get to sleep is not critical, and
> > therefore the Sleep() system call is probably most appropriate.
> I found this article (http://www.geisswerks.com/ryan/FAQS/timing.html)
> talking about windows timing granularity. It seems like we can probably
> use Sleep() as is, as you suggest, but we can increase the granularity
> if required by using timeBeginPeriod() and timeEndPeriod(), provided we
> don't need anything more accurate than 2 or 3 ms.

  I think it's fine to just use Sleep(), the timing should not be
critical at all.

  Best,

				Petr "Pasky" Baudis


More information about the Pachi mailing list