MediaProcessors
|
#include "interr_usleep.h"
#include <stdlib.h>
#include <pthread.h>
#include <errno.h>
#include "log.h"
#include "stat_codes.h"
#include "check_utils.h"
Go to the source code of this file.
Classes | |
struct | interr_usleep_ctx_s |
Macros | |
#define | UNLOCK() |
Typedefs | |
typedef struct interr_usleep_ctx_s | interr_usleep_ctx_t |
Functions | |
interr_usleep_ctx_t * | interr_usleep_open () |
void | interr_usleep_close (interr_usleep_ctx_t **ref_interr_usleep_ctx) |
void | interr_usleep_unblock (interr_usleep_ctx_t *interr_usleep_ctx) |
int | interr_usleep (interr_usleep_ctx_t *interr_usleep_ctx, uint32_t usec) |
Definition in file interr_usleep.c.
#define UNLOCK | ( | ) |
MACRO used to unlock internal MUTEX: sets exit flag and send signal to eventually unlock MUTEX
Definition at line 60 of file interr_usleep.c.
typedef struct interr_usleep_ctx_s interr_usleep_ctx_t |
Interruptible usleep context structure.
int interr_usleep | ( | interr_usleep_ctx_t * | interr_usleep_ctx, |
uint32_t | usec | ||
) |
Perform the interruptible 'usleep' operation; that is: suspends execution of the calling thread for (at least) usec microseconds. The sleep may be lengthened slightly by any system activity or by the time spent processing the call or by the granularity of system timers.
Pointer | to the interruptible module instance context structure, that was obtained in a previous call to the 'interr_usleep_open()' function. |
usec | Unsigned 32-bit integer specifying the amount of microseconds to sleep. |
Definition at line 133 of file interr_usleep.c.
void interr_usleep_close | ( | interr_usleep_ctx_t ** | ref_interr_usleep_ctx | ) |
Unlock 'usleep' operation -if applicable- and release interruptible module instance context structure.
ref_interr_usleep_ctx | Reference to the pointer to the interruptible module instance context structure to be release, that was obtained in a previous call to the 'interr_usleep_open()' function. Pointer is set to NULL on return. |
Definition at line 102 of file interr_usleep.c.
interr_usleep_ctx_t* interr_usleep_open | ( | ) |
Initializes (open) interruptible module instance.
Definition at line 70 of file interr_usleep.c.
void interr_usleep_unblock | ( | interr_usleep_ctx_t * | interr_usleep_ctx | ) |
Unlock 'usleep' operation.
Pointer | to the interruptible module instance context structure, that was obtained in a previous call to the 'interr_usleep_open()' function. |
Definition at line 122 of file interr_usleep.c.