Monado OpenXR Runtime
u_deque.h
Go to the documentation of this file.
1// Copyright 2022, Collabora, Ltd.
2// SPDX-License-Identifier: BSL-1.0
3/*!
4 * @file
5 * @brief Expose std::deque to C
6 * @author Mateo de Mayo <mateo.demayo@collabora.com>
7 * @ingroup aux_util
8 */
9
10#pragma once
11
12#include "util/u_time.h"
13#include <stddef.h>
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19#define U_DEQUE_DECLARATION(TYPE) \
20 struct u_deque_##TYPE \
21 { \
22 void *ptr; \
23 }; \
24 struct u_deque_##TYPE u_deque_##TYPE##_create(void); \
25 void u_deque_##TYPE##_push_back(struct u_deque_##TYPE ud, TYPE e); \
26 bool u_deque_##TYPE##_pop_front(struct u_deque_##TYPE ud, TYPE *e); \
27 TYPE u_deque_##TYPE##_at(struct u_deque_##TYPE ud, size_t i); \
28 size_t u_deque_##TYPE##_size(struct u_deque_##TYPE wrap); \
29 void u_deque_##TYPE##_destroy(struct u_deque_##TYPE *ud);
30
31U_DEQUE_DECLARATION(timepoint_ns)
32
33#ifdef __cplusplus
34}
35#endif
int64_t timepoint_ns
Integer timestamp type.
Definition: u_time.h:70
Time-keeping: a clock that is steady, convertible to system time, and ideally high-resolution.