mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
pulsecore: remove ancient __FreeBSD_version < 600000 code
None of this is relevant in the modern age Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/277>
This commit is contained in:
parent
2a06309edd
commit
e6560becf1
1 changed files with 0 additions and 33 deletions
|
|
@ -218,39 +218,6 @@ static inline bool pa_atomic_ptr_cmpxchg(pa_atomic_ptr_t *a, void *old_p, void*
|
|||
#include <sys/param.h>
|
||||
#include <machine/atomic.h>
|
||||
|
||||
#if __FreeBSD_version < 600000
|
||||
#if defined(__i386__) || defined(__amd64__)
|
||||
#if defined(__amd64__)
|
||||
#define atomic_load_acq_64 atomic_load_acq_long
|
||||
#endif
|
||||
static inline u_int atomic_fetchadd_int(volatile u_int *p, u_int v) {
|
||||
__asm __volatile(
|
||||
" " __XSTRING(MPLOCKED) " "
|
||||
" xaddl %0, %1 ; "
|
||||
"# atomic_fetchadd_int"
|
||||
: "+r" (v),
|
||||
"=m" (*p)
|
||||
: "m" (*p));
|
||||
|
||||
return (v);
|
||||
}
|
||||
#elif defined(__sparc__) && defined(__arch64__)
|
||||
#define atomic_load_acq_64 atomic_load_acq_long
|
||||
#define atomic_fetchadd_int atomic_add_int
|
||||
#elif defined(__ia64__)
|
||||
#define atomic_load_acq_64 atomic_load_acq_long
|
||||
static inline uint32_t
|
||||
atomic_fetchadd_int(volatile uint32_t *p, uint32_t v) {
|
||||
uint32_t value;
|
||||
|
||||
do {
|
||||
value = *p;
|
||||
} while (!atomic_cmpset_32(p, value, value + v));
|
||||
return (value);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef struct pa_atomic {
|
||||
volatile unsigned long value;
|
||||
} pa_atomic_t;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue