Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Jun 2022 17:36:03 GMT
From:      Brooks Davis <brooks@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 08f16287a540 - main - amd64: -m32 support for machine/atomic.h
Message-ID:  <202206131736.25DHa3D2061297@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by brooks:

URL: https://cgit.FreeBSD.org/src/commit/?id=08f16287a540896fbf14ed7c28c9ec99819a8df5

commit 08f16287a540896fbf14ed7c28c9ec99819a8df5
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2022-06-13 17:35:39 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2022-06-13 17:35:39 +0000

    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
---
 include/i386/Makefile      | 1 +
 sys/amd64/include/atomic.h | 7 +++++++
 2 files changed, 8 insertions(+)

diff --git a/include/i386/Makefile b/include/i386/Makefile
index 6870657b6bfa..40f272e3b8f9 100644
--- a/include/i386/Makefile
+++ b/include/i386/Makefile
@@ -4,6 +4,7 @@
 INCS=	\
 	asm.h \
 	asmacros.h \
+	atomic.h \
 	cpufunc.h \
 	profile.h
 INCSDIR=	${INCLUDEDIR}/i386
diff --git a/sys/amd64/include/atomic.h b/sys/amd64/include/atomic.h
index 159d807f777c..6f188b167b95 100644
--- a/sys/amd64/include/atomic.h
+++ b/sys/amd64/include/atomic.h
@@ -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__ */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202206131736.25DHa3D2061297>