libuev 2.4.1
event.c File Reference
#include <errno.h>
#include <sys/eventfd.h>
#include <unistd.h>
#include "uev.h"

Go to the source code of this file.

Functions

int uev_event_init (uev_ctx_t *ctx, uev_t *w, uev_cb_t *cb, void *arg)
 
int uev_event_post (uev_t *w)
 
int uev_event_stop (uev_t *w)
 

Detailed Description

Linux eventfd(2).

Definition in file event.c.

Function Documentation

◆ uev_event_init()

int uev_event_init ( uev_ctx_t * ctx,
uev_t * w,
uev_cb_t * cb,
void * arg )

Create a generic event watcher

Parameters
ctxA valid libuEv context
wPointer to an uev_t watcher
cbCallback when an event is posted
argOptional callback argument
Returns
POSIX OK(0) or non-zero with errno set on error.

Definition at line 46 of file event.c.

◆ uev_event_post()

int uev_event_post ( uev_t * w)

Post a generic event

Parameters
wWatcher to post to
Returns
POSIX OK(0) or non-zero with errno set on error.

Definition at line 70 of file event.c.

◆ uev_event_stop()

int uev_event_stop ( uev_t * w)

Stop a generic event watcher

Parameters
wWatcher to stop
Returns
POSIX OK(0) or non-zero with errno set on error.

Definition at line 92 of file event.c.