Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/cddl/osnet/dist/uts/common/os Need sys/atomic.h on ...



details:   https://anonhg.NetBSD.org/src/rev/d940eaecab99
branches:  trunk
changeset: 967170:d940eaecab99
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sun Dec 01 20:26:31 2019 +0000

description:
Need sys/atomic.h on NetBSD

diffstat:

 external/cddl/osnet/dist/uts/common/os/fm.c |  9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diffs (28 lines):

diff -r d58e6172cf54 -r d940eaecab99 external/cddl/osnet/dist/uts/common/os/fm.c
--- a/external/cddl/osnet/dist/uts/common/os/fm.c       Sun Dec 01 20:26:05 2019 +0000
+++ b/external/cddl/osnet/dist/uts/common/os/fm.c       Sun Dec 01 20:26:31 2019 +0000
@@ -64,7 +64,12 @@
 #include <sys/kobj.h>
 #include <sys/kstat.h>
 #include <sys/processor.h>
+#ifdef __NetBSD__
+#include <sys/atomic.h>
+#include <sys/cpu.h>
+#else
 #include <sys/pcpu.h>
+#endif
 #include <sys/sunddi.h>
 #include <sys/systeminfo.h>
 #include <sys/sysevent/eventdefs.h>
@@ -1194,7 +1199,11 @@
 uint64_t
 fm_ena_generate(uint64_t timestamp, uchar_t format)
 {
+#ifdef __NetBSD__
+       return (fm_ena_generate_cpu(timestamp, cpu_index(curcpu()), format));
+#else
        return (fm_ena_generate_cpu(timestamp, PCPU_GET(cpuid), format));
+#endif
 }
 
 uint64_t



Home | Main Index | Thread Index | Old Index