1 //===-- Definition of a common mutex type ---------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef __LLVM_LIBC_TYPES___MUTEX_T_H
10 #define __LLVM_LIBC_TYPES___MUTEX_T_H
11 
12 #include <llvm-libc-types/__futex_word.h>
13 
14 typedef struct {
15   unsigned char __timed;
16   unsigned char __recursive;
17   unsigned char __robust;
18 
19   void *__owner;
20   unsigned long long __lock_count;
21 
22 #ifdef __unix__
23   __futex_word __ftxw;
24 #else
25 #error "Mutex type not defined for the target platform."
26 #endif
27 } __mutex_type;
28 
29 #endif // __LLVM_LIBC_TYPES___MUTEX_T_H
30