1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright(c) 2015 Intel Corporation 3 */ 4 5 6 #ifndef LTHREAD_MUTEX_H_ 7 #define LTHREAD_MUTEX_H_ 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 #include "lthread_queue.h" 14 15 16 #define MAX_MUTEX_NAME_SIZE 64 17 18 struct lthread_mutex { 19 struct lthread *owner; 20 rte_atomic64_t count; 21 struct lthread_queue *blocked __rte_cache_aligned; 22 struct lthread_sched *root_sched; 23 char name[MAX_MUTEX_NAME_SIZE]; 24 uint64_t diag_ref; /* optional ref to user diag data */ 25 } __rte_cache_aligned; 26 27 #ifdef __cplusplus 28 } 29 #endif 30 31 #endif /* LTHREAD_MUTEX_H_ */ 32