Move to kernel style SPDX license identifiers
[lttng-ust.git] / include / lttng / counter-config.h
CommitLineData
ebabbf58 1/*
c0c0989a 2 * SPDX-License-Identifier: MIT
ebabbf58
MD
3 *
4 * Copyright (C) 2020 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
5 *
c0c0989a 6 * LTTng Counters Configuration
ebabbf58
MD
7 */
8
9#ifndef _LTTNG_COUNTER_CONFIG_H
10#define _LTTNG_COUNTER_CONFIG_H
11
12#include <stdint.h>
13
14enum lib_counter_config_alloc {
15 COUNTER_ALLOC_PER_CPU = (1 << 0),
16 COUNTER_ALLOC_GLOBAL = (1 << 1),
17};
18
19enum lib_counter_config_sync {
20 COUNTER_SYNC_PER_CPU,
21 COUNTER_SYNC_GLOBAL,
22};
23
24struct lib_counter_config {
25 uint32_t alloc; /* enum lib_counter_config_alloc flags */
26 enum lib_counter_config_sync sync;
27 enum {
28 COUNTER_ARITHMETIC_MODULAR,
29 COUNTER_ARITHMETIC_SATURATE, /* TODO */
30 } arithmetic;
31 enum {
32 COUNTER_SIZE_8_BIT = 1,
33 COUNTER_SIZE_16_BIT = 2,
34 COUNTER_SIZE_32_BIT = 4,
35 COUNTER_SIZE_64_BIT = 8,
36 } counter_size;
37};
38
39#endif /* _LTTNG_COUNTER_CONFIG_H */
This page took 0.024004 seconds and 4 git commands to generate.