aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/include-abi/odp/api/abi/barrier.h
blob: 51d913774c8e03793cd74f36acd7fa26c8352072 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* Copyright (c) 2015, Linaro Limited
 * All rights reserved.
 *
 * SPDX-License-Identifier:     BSD-3-Clause
 */

/**
 * @file
 *
 * ODP barrier
 */

#ifndef ODP_ABI_BARRIER_H_
#define ODP_ABI_BARRIER_H_

#ifdef __cplusplus
extern "C" {
#endif

#include <odp/api/std_types.h>
#include <odp/api/atomic.h>

/**
 * @internal
 * ODP thread synchronization barrier
 */
struct odp_barrier_s {
	uint32_t         count;  /**< Thread count */
	odp_atomic_u32_t bar;    /**< Barrier counter */
};

typedef struct odp_barrier_s odp_barrier_t;

#ifdef __cplusplus
}
#endif

#endif