$NetBSD: patch-af,v 1.12 2009/06/05 11:10:35 wiz Exp $ --- src/mesa/drivers/dri/sis/sis_context.h.orig 2009-05-19 11:47:27 +0300 +++ src/mesa/drivers/dri/sis/sis_context.h 2009-05-19 11:48:44 +0300 @@ -404,7 +404,14 @@ struct sis_context #define MMIO_WMB() __asm __volatile("" : : : "memory") #elif defined(__ia64__) #define MMIO_WMB() __asm __volatile("mf" : : : "memory") +#elif defined(HAVE_NETBSD_ATOMIC_H) +#include +#define MMIO_WMB() membar_sync() /* XXX is this adequate? */ +#elif defined(__sync_synchronize) /* gcc built-in */ +#define MMIO_WMB() __sync_synchronize() #else +#warning Please define MMIO_WMB for this platform +#define MMIO_WMB() #error platform needs WMB #endif