blob: ee927014ad7501d61d53db26831fb484ffada008 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
/* $OpenBSD: lock.h,v 1.7 2015/02/11 00:14:11 dlg Exp $ */
/* public domain */
#ifndef _MIPS64_LOCK_H_
#define _MIPS64_LOCK_H_
#include <sys/atomic.h>
static __inline int
__cpu_cas(volatile unsigned long *addr, unsigned long old, unsigned long new)
{
return (atomic_cas_ulong(addr, old, new) != old);
}
#endif /* _MIPS64_LOCK_H_ */
|