www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/10/25/11:01:01

Date: Wed, 25 Oct 1995 17:01:14 +0300
From: "Alexander V. Lukyanov" <lav AT video DOT yars DOT free DOT net>
To: eliz AT is DOT elta DOT co DOT il
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: need something better than kbhit()

> Date: Wed, 25 Oct 1995 15:45:12 +0200 (IST)
> From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
> 
> On Wed, 25 Oct 1995, Alexander V. Lukyanov wrote:
> 
> > Is there 'poll' function in v2.0 ?
> 
> I don't think so, but if you describe what should it do, maybe there is a 
> combination of existing functions that will do the trick.

'poll' and 'select' both do I/O multiplexing, but poll comes from SystemV,
and select from BSD.
IMHO, poll has more convenient argumet types than select, so I prefer to
use 'poll'.

int  poll(struct pollfd *fds, unsigned long nfds, int timeout);

struct pollfd
{
   int fd;          /* file descriptor */
   short events;    /* requested events */
   short revents;   /* returned events */
};
		    

- Raw text -


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