1 //===-- Definition of type which can represent a futex word ---------------===// 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___FUTEX_WORD_H 10 #define LLVM_LIBC_TYPES___FUTEX_WORD_H 11 12 typedef struct { 13 // Futex word should be aligned appropriately to allow target atomic 14 // instructions. This declaration mimics the internal setup. 15 _Alignas(sizeof(__UINT32_TYPE__) > _Alignof(__UINT32_TYPE__) 16 ? sizeof(__UINT32_TYPE__) 17 : _Alignof(__UINT32_TYPE__)) __UINT32_TYPE__ __word; 18 } __futex_word; 19 20 #endif // LLVM_LIBC_TYPES___FUTEX_WORD_H 21