Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: How many chess engines use Linux as their primary OS?

Author: Russell Reagan

Date: 10:31:57 06/24/03

Go up one level in this thread


On June 24, 2003 at 13:01:07, Andrew Williams wrote:

>---------------------------------
>Linux         Windows
>---------------------------------
>read()   ==>  _read()
>write()  ==>  _write()
>select() ~~>  PeekNamedPipe()
>---------------------------------
>
>Unfortunately, that ~~> is less like the ==> than I had suspected!

I'm not sure about this, but I think that WaitForSingleObject or
WaitForMultipleObjects might be the equivalent Windows command of the unix
select command. It works for HANDLEs (a Win32 type, just a 32-bit value), and a
HANDLE can be to a file, a window, a socket, etc. IIRC. This sounds more like
what select does than PeekNamedPipe, which is more specific to files/pipes.

This website (http://wint.decsy.ru/du/DIGITAL/UNIXNT/CH9.HTM) has some
information about porting from unix to Windows. This is from the "Handles"
section.

"Handles of synchronization objects (events, semaphores, mutexes) and
asynchronous I/O (named pipes and files opened with OpenFile(), not fopen()) can
be used with the Win32 APIs WaitForSingleObject() and WaitForMultipleObjects(),
providing similar functionality to the UNIX select() system call."



This page took 0.01 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.