libexplain  1.4.D001
Defines | Functions | Variables
libexplain/buffer/timerfd_flags.c File Reference
#include <libexplain/ac/fcntl.h>
#include <libexplain/ac/sys/timerfd.h>
#include <libexplain/buffer/timerfd_flags.h>
#include <libexplain/parse_bits.h>
#include <libexplain/sizeof.h>

Go to the source code of this file.

Defines

#define TFD_NONBLOCK   O_NONBLOCK
#define O_CLOEXEC   02000000
#define TFD_CLOEXEC   O_CLOEXEC

Functions

void explain_buffer_timerfd_flags (explain_string_buffer_t *sb, int flags)
int explain_parse_timerfd_flags_or_die (const char *text, const char *caption)

Variables

static const
explain_parse_bits_table_t 
table []

Define Documentation

#define O_CLOEXEC   02000000

Definition at line 32 of file timerfd_flags.c.

#define TFD_CLOEXEC   O_CLOEXEC

Definition at line 36 of file timerfd_flags.c.

#define TFD_NONBLOCK   O_NONBLOCK

Definition at line 28 of file timerfd_flags.c.


Function Documentation

void explain_buffer_timerfd_flags ( explain_string_buffer_t sb,
int  value 
)

The explain_buffer_timerfd_flags function may be used to print a representation of a timerfd_flags value.

Parameters:
sbThe string buffer to print into.
valueThe timerfd_flags value to be printed.

Definition at line 47 of file timerfd_flags.c.

int explain_parse_timerfd_flags_or_die ( const char *  text,
const char *  caption 
)

The explain_parse_timerfd_flags_or_die function is used to parse a text string for a timerfd_create flags value.

Parameters:
textThe text to be parsed
captionaddition text for error messages
Returns:
the timerfd_create flaga value. Does not return on error.

Definition at line 54 of file timerfd_flags.c.


Variable Documentation

Initial value:
{
    { "TFD_NONBLOCK", TFD_NONBLOCK },
    { "TFD_CLOEXEC", TFD_CLOEXEC },
}

Definition at line 39 of file timerfd_flags.c.