1 /*
2  * SPDX-License-Identifier: BSD-3-Clause
3  * SPDX-FileCopyrightText: Copyright TF-RMM Contributors.
4  */
5 
6 #ifndef SPINLOCK_H
7 #define SPINLOCK_H
8 
9 #include <host_harness.h>
10 
11 typedef struct spinlock_s {
12 	unsigned int val;
13 } spinlock_t;
14 
spinlock_acquire(spinlock_t * l)15 static inline void spinlock_acquire(spinlock_t *l)
16 {
17 	host_spinlock_acquire(l);
18 }
19 
spinlock_release(spinlock_t * l)20 static inline void spinlock_release(spinlock_t *l)
21 {
22 	host_spinlock_release(l);
23 }
24 
25 #endif /* SPINLOCK_H */
26