upipe/ueventfd.h header reference

Upipe replacement for eventfd calls More

Header inclusion  

Members  

Types  

Functions  

Description  

Upipe replacement for eventfd calls

Members detail  

#define FD_CLOEXEC  

This macro is declared in upipe/ueventfd.h source file, line 58.

#define _UPIPE_UEVENTFD_H_  

This macro is declared in upipe/ueventfd.h source file, line 31.

struct ueventfd  

This struct is declared in upipe/ueventfd.h source file, line 71.

This struct allows to wait on a condition in a upump event loop.

FieldDescription
enum ueventfd_mode mode;mode of allocation of the ueventfd
union <anonymous> {
int event_fd;used when eventfd() is available
int pipe_fds[2];used when pipe() is available
};

void ueventfd_clean(struct ueventfd *fd)  

This function is declared in upipe/ueventfd.h source file, line 284.

This function releases any data and file descriptors associated with the ueventfd.

Parameter list:

  • fd: pointer to a ueventfd

bool ueventfd_init(struct ueventfd *fd, bool readable)  

This function is declared in upipe/ueventfd.h source file, line 222.

This function initializes a ueventfd.

Parameter list:

  • fd: pointer to a ueventfd
  • readable: true if the ueventfd must be initialized as readable

The return value is false in case of failure

enum ueventfd_mode  

This enum is declared in upipe/ueventfd.h source file, line 63.

This enum is a list of the available allocation modes for the ueventfd.

IdentifierValueDescription
UEVENTFD_MODE_EVENTFD0uses the eventfd() system call
UEVENTFD_MODE_PIPE1uses the pipe() system call

bool ueventfd_read(struct ueventfd *fd)  

This function is declared in upipe/ueventfd.h source file, line 117.

This function reads from a ueventfd and makes it non-readable.

Parameter list:

  • fd: pointer to a ueventfd

The return value is false in case of an unrecoverable error

struct upump * ueventfd_upump_alloc(struct ueventfd *fd, struct upump_mgr *upump_mgr, upump_cb cb, void *opaque, struct urefcount *refcount)  

This function is declared in upipe/ueventfd.h source file, line 96.

This function allocates a watcher triggering when the ueventfd is readable.

Parameter list:

  • fd: pointer to a ueventfd
  • upump_mgr: management structure for this event loop
  • cb: function to call when the watcher triggers
  • opaque: pointer to the module's internal structure
  • refcount: pointer to urefcount structure to increment during callback, or NULL

The return value is pointer to allocated watcher, or NULL in case of failure

bool ueventfd_write(struct ueventfd *fd)  

This function is declared in upipe/ueventfd.h source file, line 169.

This function writes to a ueventfd and make it readable.

Parameter list:

  • fd: pointer to a ueventfd

The return value is false in case of an unrecoverable error

Valid XHTML 1.0 StrictGenerated by cmassiot on Fri Feb 2 23:57:19 2018 using MkDoc