diff options
author | Dave Airlie <airlied@redhat.com> | 2008-09-26 15:37:21 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2008-09-30 14:13:49 +1000 |
commit | 972f6572652bc4a2f6c44c525e5e91f2becdb62a (patch) | |
tree | 60af3dc7e8a7c0f8bef7a3927dae161093b10dbe /bsd-core/drm_atomic.h | |
parent | 89126bb58ec82511758bed36a28e698b721fb435 (diff) | |
parent | 2db8e0c8ef8c7a66460fceda129533b364f6418c (diff) |
Merge remote branch 'origin/master' into modesetting-gem
Conflicts:
libdrm/Makefile.am
libdrm/dri_bufmgr.h
linux-core/drm_irq.c
linux-core/drm_sysfs.c
linux-core/drm_ttm.c
shared-core/i915_dma.c
shared-core/i915_irq.c
shared-core/nouveau_drv.h
shared-core/radeon_cp.c
Diffstat (limited to 'bsd-core/drm_atomic.h')
-rw-r--r-- | bsd-core/drm_atomic.h | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/bsd-core/drm_atomic.h b/bsd-core/drm_atomic.h index b499fc96..76de7a2f 100644 --- a/bsd-core/drm_atomic.h +++ b/bsd-core/drm_atomic.h @@ -33,65 +33,12 @@ typedef u_int32_t atomic_t; -#ifdef __FreeBSD__ #define atomic_set(p, v) (*(p) = (v)) #define atomic_read(p) (*(p)) #define atomic_inc(p) atomic_add_int(p, 1) #define atomic_dec(p) atomic_subtract_int(p, 1) #define atomic_add(n, p) atomic_add_int(p, n) #define atomic_sub(n, p) atomic_subtract_int(p, n) -#else /* __FreeBSD__ */ -/* FIXME */ -#define atomic_set(p, v) (*(p) = (v)) -#define atomic_read(p) (*(p)) -#define atomic_inc(p) (*(p) += 1) -#define atomic_dec(p) (*(p) -= 1) -#define atomic_add(n, p) (*(p) += (n)) -#define atomic_sub(n, p) (*(p) -= (n)) -/* FIXME */ -#define atomic_add_int(p, v) *(p) += v -#define atomic_subtract_int(p, v) *(p) -= v -#define atomic_set_int(p, bits) *(p) |= (bits) -#define atomic_clear_int(p, bits) *(p) &= ~(bits) -#endif /* !__FreeBSD__ */ - -#if !defined(__FreeBSD_version) || (__FreeBSD_version < 500000) -#if defined(__i386__) -/* The extra atomic functions from 5.0 haven't been merged to 4.x */ -static __inline int -atomic_cmpset_int(volatile u_int *dst, u_int exp, u_int src) -{ - int res = exp; - - __asm __volatile ( - " lock ; " - " cmpxchgl %1,%2 ; " - " setz %%al ; " - " movzbl %%al,%0 ; " - "1: " - "# atomic_cmpset_int" - : "+a" (res) /* 0 (result) */ - : "r" (src), /* 1 */ - "m" (*(dst)) /* 2 */ - : "memory"); - - return (res); -} -#else /* __i386__ */ -static __inline int -atomic_cmpset_int(__volatile__ int *dst, int old, int new) -{ - int s = splhigh(); - if (*dst==old) { - *dst = new; - splx(s); - return 1; - } - splx(s); - return 0; -} -#endif /* !__i386__ */ -#endif /* !__FreeBSD_version || __FreeBSD_version < 500000 */ static __inline atomic_t test_and_set_bit(int b, volatile void *p) |