axl_bool vortex_io_waiting_use ( VortexCtx ctx,
VortexIoWaitingType  type 
)

poll(2) system call implementation.

linux epoll(2) system call implementation. Allows to configure the default io waiting mechanism to be used by the library.

To get current mechanism selected you must use vortex_io_waiting_get_current. During the compilation process, vortex selects the default mechanism, choosing the best available.

This function is designed to support changing the I/O API at runtime so, you can call to this function during normal vortex operations.

Here is an example of code on how to change the default mechanism to use system call poll(2):

1 // check the mechanism is available
2 if (vortex_io_waiting_is_available (VORTEX_IO_WAIT_POLL)) {
3  // configure the mechanism
4  vortex_io_waiting_use (ctx, VORTEX_IO_WAIT_POLL);
5 }
Parameters
ctxThe context where the operation will be performed.
typeThe I/O waiting mechanism to be used by the library (especially at the vortex reader module).
Returns
axl_true if the mechanism was activated, otherwise axl_false is returned.

References VORTEX_IO_WAIT_EPOLL, VORTEX_IO_WAIT_POLL, VORTEX_IO_WAIT_SELECT, and vortex_io_waiting_is_available().