zig/lib/libc/include/aarch64-netbsd-none/aarch64/lock.h
Alex Rønne Petersen 553cb3ed46
libc: Add NetBSD system and libc headers from 10.1.
sys/param.h was manually adjusted to not define __NetBSD_Version__ since it will
be defined by the compiler.
2025-05-17 04:41:27 +02:00

20 lines
No EOL
440 B
C
Vendored

/* $NetBSD: lock.h,v 1.5 2022/07/24 20:28:32 riastradh Exp $ */
#ifndef _AARCH64_LOCK_H_
#define _AARCH64_LOCK_H_
#include <sys/param.h>
#ifdef __aarch64__
# ifdef _HARDKERNEL
# ifdef SPINLOCK_BACKOFF_HOOK
# undef SPINLOCK_BACKOFF_HOOK
# endif
# define SPINLOCK_BACKOFF_HOOK asm volatile("yield" ::: "memory")
# endif
# include <sys/common_lock.h>
#elif defined(__arm__)
# include <arm/lock.h>
#endif
#endif /* _AARCH64_LOCK_H_ */