summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2003-03-05 04:14:52 +0000
committerEric Anholt <anholt@freebsd.org>2003-03-05 04:14:52 +0000
commit1434bfe4a8e5fb7b6e8f52d3a732582e61216f68 (patch)
tree0c4059b358d339d7826e928467fa4eda7f05269b
parent51e5f73d2a4020a1bae860057bae2b0eff8e9c70 (diff)
Remove a paste-o in DRM_SPINUNINIT and add a volatile to the compatibility
atomic_cmpset_int.
-rw-r--r--bsd-core/drm_os_freebsd.h4
-rw-r--r--bsd/drm_os_freebsd.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/bsd-core/drm_os_freebsd.h b/bsd-core/drm_os_freebsd.h
index 6b75ccc3..b458ed68 100644
--- a/bsd-core/drm_os_freebsd.h
+++ b/bsd-core/drm_os_freebsd.h
@@ -88,7 +88,7 @@
#define DRM_STRUCTPROC struct proc
#define DRM_SPINTYPE struct simplelock
#define DRM_SPININIT(l,name) simple_lock_init(&l)
-#define DRM_SPINUNINIT(l,name)
+#define DRM_SPINUNINIT(l)
#define DRM_SPINLOCK(l) simple_lock(l)
#define DRM_SPINUNLOCK(u) simple_unlock(u);
#define DRM_CURRENTPID curproc->p_pid
@@ -230,7 +230,7 @@ typedef u_int8_t u8;
#if __FreeBSD_version < 500000
/* The extra atomic functions from 5.0 haven't been merged to 4.x */
static __inline int
-atomic_cmpset_int(int *dst, int old, int new)
+atomic_cmpset_int(volatile int *dst, int old, int new)
{
int s = splhigh();
if (*dst==old) {
diff --git a/bsd/drm_os_freebsd.h b/bsd/drm_os_freebsd.h
index 6b75ccc3..b458ed68 100644
--- a/bsd/drm_os_freebsd.h
+++ b/bsd/drm_os_freebsd.h
@@ -88,7 +88,7 @@
#define DRM_STRUCTPROC struct proc
#define DRM_SPINTYPE struct simplelock
#define DRM_SPININIT(l,name) simple_lock_init(&l)
-#define DRM_SPINUNINIT(l,name)
+#define DRM_SPINUNINIT(l)
#define DRM_SPINLOCK(l) simple_lock(l)
#define DRM_SPINUNLOCK(u) simple_unlock(u);
#define DRM_CURRENTPID curproc->p_pid
@@ -230,7 +230,7 @@ typedef u_int8_t u8;
#if __FreeBSD_version < 500000
/* The extra atomic functions from 5.0 haven't been merged to 4.x */
static __inline int
-atomic_cmpset_int(int *dst, int old, int new)
+atomic_cmpset_int(volatile int *dst, int old, int new)
{
int s = splhigh();
if (*dst==old) {