]>
git.proxmox.com Git - ceph.git/blob - ceph/src/spdk/dpdk/lib/librte_eal/arm/include/rte_spinlock.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2015 RehiveTech. All rights reserved.
5 #ifndef _RTE_SPINLOCK_ARM_H_
6 #define _RTE_SPINLOCK_ARM_H_
8 #ifndef RTE_FORCE_INTRINSICS
9 # error Platform must be built with CONFIG_RTE_FORCE_INTRINSICS
16 #include <rte_common.h>
17 #include "generic/rte_spinlock.h"
19 static inline int rte_tm_supported(void)
25 rte_spinlock_lock_tm(rte_spinlock_t
*sl
)
27 rte_spinlock_lock(sl
); /* fall-back */
31 rte_spinlock_trylock_tm(rte_spinlock_t
*sl
)
33 return rte_spinlock_trylock(sl
);
37 rte_spinlock_unlock_tm(rte_spinlock_t
*sl
)
39 rte_spinlock_unlock(sl
);
43 rte_spinlock_recursive_lock_tm(rte_spinlock_recursive_t
*slr
)
45 rte_spinlock_recursive_lock(slr
); /* fall-back */
49 rte_spinlock_recursive_unlock_tm(rte_spinlock_recursive_t
*slr
)
51 rte_spinlock_recursive_unlock(slr
);
55 rte_spinlock_recursive_trylock_tm(rte_spinlock_recursive_t
*slr
)
57 return rte_spinlock_recursive_trylock(slr
);
64 #endif /* _RTE_SPINLOCK_ARM_H_ */