Source-Changes-HG archive

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

[src/trunk]: src/lib/librumpuser FreeBSD fixes.



details:   https://anonhg.NetBSD.org/src/rev/508c5b7b4caa
branches:  trunk
changeset: 782916:508c5b7b4caa
user:      pooka <pooka%NetBSD.org@localhost>
date:      Mon Nov 26 17:03:15 2012 +0000

description:
FreeBSD fixes.

from philip%freebsd.org@localhost

diffstat:

 lib/librumpuser/rumpuser_port.h |   4 ++--
 lib/librumpuser/rumpuser_sp.c   |  10 ++++++++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diffs (49 lines):

diff -r 941c6f05e6c9 -r 508c5b7b4caa lib/librumpuser/rumpuser_port.h
--- a/lib/librumpuser/rumpuser_port.h   Mon Nov 26 17:00:54 2012 +0000
+++ b/lib/librumpuser/rumpuser_port.h   Mon Nov 26 17:03:15 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rumpuser_port.h,v 1.7 2012/11/26 16:30:14 pooka Exp $  */
+/*     $NetBSD: rumpuser_port.h,v 1.8 2012/11/26 17:03:15 pooka Exp $  */
 
 /*
  * Portability header for non-NetBSD platforms.
@@ -49,7 +49,7 @@
 #include <sys/types.h>
 #include <sys/param.h>
 
-#if defined(__linux__) || defined(__sun__)
+#if defined(__linux__) || defined(__sun__) || defined(__FreeBSD__)
 #include <errno.h>
 #include <stdlib.h>
 #include <string.h>
diff -r 941c6f05e6c9 -r 508c5b7b4caa lib/librumpuser/rumpuser_sp.c
--- a/lib/librumpuser/rumpuser_sp.c     Mon Nov 26 17:00:54 2012 +0000
+++ b/lib/librumpuser/rumpuser_sp.c     Mon Nov 26 17:03:15 2012 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: rumpuser_sp.c,v 1.48 2012/09/21 14:33:03 pooka Exp $  */
+/*      $NetBSD: rumpuser_sp.c,v 1.49 2012/11/26 17:03:15 pooka Exp $  */
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -37,7 +37,7 @@
 #include "rumpuser_port.h"
 
 #if !defined(lint)
-__RCSID("$NetBSD: rumpuser_sp.c,v 1.48 2012/09/21 14:33:03 pooka Exp $");
+__RCSID("$NetBSD: rumpuser_sp.c,v 1.49 2012/11/26 17:03:15 pooka Exp $");
 #endif /* !lint */
 
 #include <sys/types.h>
@@ -117,6 +117,12 @@
        return discocnt;
 }
 
+#elif defined(__FreeBSD__)
+
+#include <machine/atomic.h>
+#define signaldisco()  atomic_add_int(&disco, 1)
+#define getdisco()     atomic_readandclear_int(&disco)
+
 #else /* NetBSD */
 
 #include <sys/atomic.h>



Home | Main Index | Thread Index | Old Index