From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Egger Subject: [PATCH][XEN] public header: portability Date: Thu, 21 Aug 2008 12:03:48 +0200 Message-ID: <200808211203.48511.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_E2TrIICTedho0kK" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --Boundary-00=_E2TrIICTedho0kK Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi! Attached patch defines xen_*mb() macros for NetBSD. Signed-off-by: Christoph Egger =2D-=20 AMD Saxony, Dresden, Germany Operating System Research Center Legal Information: AMD Saxony Limited Liability Company & Co. KG Sitz (Gesch=E4ftsanschrift): Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland Registergericht Dresden: HRA 4896 vertretungsberechtigter Komplement=E4r: AMD Saxony LLC (Sitz Wilmington, Delaware, USA) Gesch=E4ftsf=FChrer der AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy --Boundary-00=_E2TrIICTedho0kK Content-Type: text/x-diff; charset="us-ascii"; name="public_ring.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="public_ring.diff" diff -r 598d92a5ae7a xen/include/public/io/ring.h --- a/xen/include/public/io/ring.h Wed Aug 20 14:45:21 2008 +0100 +++ b/xen/include/public/io/ring.h Thu Aug 21 11:27:43 2008 +0200 @@ -30,9 +30,16 @@ #include "../xen-compat.h" #if __XEN_INTERFACE_VERSION__ < 0x00030208 +#if defined(__Linux__) #define xen_mb() mb() #define xen_rmb() rmb() #define xen_wmb() wmb() +#endif +#if defined(__NetBSD__) +#define xen_mb() x86_mfence() +#define xen_rmb() x86_lfence() +#define xen_wmb() x86_sfence() +#endif #endif typedef unsigned int RING_IDX; --Boundary-00=_E2TrIICTedho0kK Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_E2TrIICTedho0kK--