blob: c54d76eb28ea135dc7e9daaee6abfb0591559e29 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
$NetBSD: patch-af,v 1.11 2008/08/17 09:41:35 bjs Exp $
--- src/mesa/drivers/dri/sis/sis_context.h.orig 2008-07-18 10:39:12.000000000 -0400
+++ src/mesa/drivers/dri/sis/sis_context.h
@@ -403,8 +403,14 @@ struct sis_context
#if defined(__i386__) || defined(__amd64__)
#define MMIO_WMB() __asm __volatile("" : : : "memory")
+#elif defined(HAVE_NETBSD_ATOMIC_H)
+#include <sys/atomic.h>
+#define MMIO_WMB() membar_sync() /* XXX is this adequate? */
+#elif defined(__sync_synchronize) /* gcc built-in */
+#define MMIO_WMB() __sync_synchronize()
#else
-#error platform needs WMB
+#warning Please define MMIO_WMB for this platform
+#define MMIO_WMB()
#endif
#define mEndPrimitive() \
|