libexplain
1.4.D001
|
#include <libexplain/ac/errno.h>
#include <libexplain/ac/time.h>
#include <libexplain/nanosleep.h>
#include <libexplain/output.h>
Go to the source code of this file.
Functions | |
void | explain_nanosleep_or_die (const struct timespec *req, struct timespec *rem) |
int | explain_nanosleep_on_error (const struct timespec *req, struct timespec *rem) |
int explain_nanosleep_on_error | ( | const struct timespec * | req, |
struct timespec * | rem | ||
) |
The explain_nanosleep_on_error function is used to call the nanosleep(2) system call. On failure an explanation will be printed to stderr, obtained from the explain_nanosleep(3) function.
req | The req, exactly as to be passed to the nanosleep(2) system call. |
rem | The rem, exactly as to be passed to the nanosleep(2) system call. |
if (explain_nanosleep_on_error(req, rem) < 0) { ...cope with error ...no need to print error message }
Definition at line 37 of file nanosleep_or_die.c.
void explain_nanosleep_or_die | ( | const struct timespec * | req, |
struct timespec * | rem | ||
) |
The explain_nanosleep_or_die function is used to call the nanosleep(2) system call. On failure an explanation will be printed to stderr, obtained from the explain_nanosleep(3) function, and then the process terminates by calling exit(EXIT_FAILURE)
.
req | The req, exactly as to be passed to the nanosleep(2) system call. |
rem | The rem, exactly as to be passed to the nanosleep(2) system call. |
explain_nanosleep_or_die(req, rem);
Definition at line 27 of file nanosleep_or_die.c.