CNDP 22.08.0
Loading...
Searching...
No Matches
cthread_mutex.h
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright (c) 2019-2022 Intel Corporation
3 */
4
5#ifndef _CTHREAD_MUTEX_H_
6#define _CTHREAD_MUTEX_H_
7
8#include "cthread_queue.h"
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14#define MAX_MUTEX_NAME_SIZE 32
15
16struct cthread_mutex {
17 struct cthread *owner;
18 CNE_ATOMIC(uint_least16_t) waiters;
19 struct cthread_queue *blocked __cne_cache_aligned;
20 struct cthread_sched *sched;
21 uint32_t flags;
22 char name[MAX_MUTEX_NAME_SIZE];
24
25#ifdef __cplusplus
26}
27#endif
28
29#endif /* _CTHREAD_MUTEX_H_ */
#define __cne_cache_aligned
Definition cne_common.h:379