Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
iom_wait(3)		   Library Functions Manual		   iom_wait(3)

NAME
       iom_wait	- wait for event from I/O multiplexer

SYNTAX
       #include	<libowfat/io.h>

       int iom_wait(iomux_t* c,
			  int64*  fd,  unsigned	 int* events,		   un-
       signed long timeout);

DESCRIPTION
       iom_wait	will wait for events registered	to the	I/O  multiplexer  with
       iom_add.	It will	wait timeout milliseconds.

       If  during  that	time any of the	registered events occur, iom_wait will
       set fd to the file descriptor the event happened	on, and	events to  the
       sum of IOM_READ,	IOM_WRITE and IOM_ERROR, depending on what event actu-
       ally happened, and return 1.

       If  nothing happens during that time, it	will return 0 and leave	fd and
       events alone.

       Note that the event registration	is removed from	the iomux_t context if
       it occurs. You will have	to call	iom_wait again after you  handled  the
       event, if you are still interested in it.

       Closing a file descriptor with registered events	will discard the event
       registration.

LINKING
       You may have to add -lpthread to	the command line in the	linking	step.

RETURN VALUE
       iom_wait	 returns 1 on success, 0 if there was a	timeout, and -1	on er-
       ror, setting errno. If iom_abort	was called on the I/O multiplexer con-
       text, it	will return -2.

SEE ALSO
       iom_init, iom_add, iom_abort

								   iom_wait(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=libowfat_iom_wait&sektion=3&manpath=FreeBSD+Ports+14.3.quarterly>

home | help