RTE OSAdapter POSIX
0.1.0 build 41b3eb3
POSIX/Linux OAL OSAdapter for Platform_RTE
Toggle main menu visibility
Loading...
Searching...
No Matches
rte_posix_osadapter_period.h
Go to the documentation of this file.
1
45
#ifndef RTE_POSIX_OSADAPTER_PERIOD_H
46
#define RTE_POSIX_OSADAPTER_PERIOD_H
47
48
#include <signal.h>
49
#include <stdbool.h>
50
#include <time.h>
51
52
#include "rte/utils/status/rte_status.h"
53
#include "rte/utils/types/rte_types.h"
54
65
rte_status_t
posix_period_init
(
struct
timespec *out_deadline);
66
75
void
posix_period_advance
(
struct
timespec *deadline, rte_duration_ms_t period_ms);
76
101
rte_status_t
posix_period_sleep_until
(
const
struct
timespec *deadline,
const
volatile
sig_atomic_t *should_stop);
102
113
bool
posix_period_wake_ready
(
void
);
114
126
void
posix_period_wake_all
(
volatile
sig_atomic_t *should_stop);
127
128
#endif
/* RTE_POSIX_OSADAPTER_PERIOD_H */
posix_period_init
rte_status_t posix_period_init(struct timespec *out_deadline)
Starts a period: reads CLOCK_MONOTONIC into the deadline.
Definition
rte_posix_osadapter_period.c:70
posix_period_wake_all
void posix_period_wake_all(volatile sig_atomic_t *should_stop)
Requests a stop of a periodic thread and wakes it from its wait.
Definition
rte_posix_osadapter_period.c:139
posix_period_wake_ready
bool posix_period_wake_ready(void)
Creates the process-wide wake object on the first call; true once it exists.
Definition
rte_posix_osadapter_period.c:127
posix_period_sleep_until
rte_status_t posix_period_sleep_until(const struct timespec *deadline, const volatile sig_atomic_t *should_stop)
Waits until the absolute CLOCK_MONOTONIC deadline, or until a stop is requested.
Definition
rte_posix_osadapter_period.c:109
posix_period_advance
void posix_period_advance(struct timespec *deadline, rte_duration_ms_t period_ms)
Moves the deadline one period later, keeping tv_nsec in [0, 1 s).
Definition
rte_posix_osadapter_period.c:92
src
rte_posix_osadapter_period.h
Generated by
1.18.0