amd64: -m32 support for machine/atomic.h

Install the i386 atomic.h under /usr/include/i386 on amd64 and include
when targeting i386.

Reviewed by:	jhb, imp
This commit is contained in:
Brooks Davis 2022-06-13 18:35:39 +01:00
parent 92a98611ca
commit 08f16287a5
2 changed files with 8 additions and 0 deletions

View File

@ -4,6 +4,7 @@
INCS= \
asm.h \
asmacros.h \
atomic.h \
cpufunc.h \
profile.h
INCSDIR= ${INCLUDEDIR}/i386

View File

@ -27,6 +27,11 @@
*
* $FreeBSD$
*/
#ifdef __i386__
#include <i386/atomic.h>
#else /* !__i386__ */
#ifndef _MACHINE_ATOMIC_H_
#define _MACHINE_ATOMIC_H_
@ -592,3 +597,5 @@ atomic_swap_long(volatile u_long *p, u_long v)
#endif /* !SAN_NEEDS_INTERCEPTORS || SAN_RUNTIME */
#endif /* !_MACHINE_ATOMIC_H_ */
#endif /* __i386__ */