xref: /minix3/minix/lib/libasyn/asyn_pending.c (revision 433d6423c39e34ec4b79c950597bb2d236f886be)
1*433d6423SLionel Sambuc /*	asyn_pending() - any results pending?		Author: Kees J. Bot
2*433d6423SLionel Sambuc  *								7 Jul 1997
3*433d6423SLionel Sambuc  */
4*433d6423SLionel Sambuc #include "asyn.h"
5*433d6423SLionel Sambuc 
asyn_pending(asynchio_t * asyn,int fd,int op)6*433d6423SLionel Sambuc int asyn_pending(asynchio_t *asyn, int fd, int op)
7*433d6423SLionel Sambuc /* Check if a result of an operation is pending.  (This is easy with
8*433d6423SLionel Sambuc  * select(2), because no operation is actually happening.)
9*433d6423SLionel Sambuc  */
10*433d6423SLionel Sambuc {
11*433d6423SLionel Sambuc 	if ((unsigned) fd >= FD_SETSIZE) { errno= EBADF; return -1; }
12*433d6423SLionel Sambuc 
13*433d6423SLionel Sambuc 	return 0;
14*433d6423SLionel Sambuc }
15