Changeset View
Changeset View
Standalone View
Standalone View
head/sys/i386/include/atomic.h
Show First 20 Lines • Show All 98 Lines • ▼ Show 20 Lines | |||||
/* | /* | ||||
* The above functions are expanded inline in the statically-linked | * The above functions are expanded inline in the statically-linked | ||||
* kernel. Lock prefixes are generated if an SMP kernel is being | * kernel. Lock prefixes are generated if an SMP kernel is being | ||||
* built. | * built. | ||||
* | * | ||||
* Kernel modules call real functions which are built into the kernel. | * Kernel modules call real functions which are built into the kernel. | ||||
* This allows kernel modules to be portable between UP and SMP systems. | * This allows kernel modules to be portable between UP and SMP systems. | ||||
*/ | */ | ||||
#if defined(KLD_MODULE) || !defined(__GNUCLIKE_ASM) | #if !defined(__GNUCLIKE_ASM) | ||||
#define ATOMIC_ASM(NAME, TYPE, OP, CONS, V) \ | #define ATOMIC_ASM(NAME, TYPE, OP, CONS, V) \ | ||||
void atomic_##NAME##_##TYPE(volatile u_##TYPE *p, u_##TYPE v); \ | void atomic_##NAME##_##TYPE(volatile u_##TYPE *p, u_##TYPE v); \ | ||||
void atomic_##NAME##_barr_##TYPE(volatile u_##TYPE *p, u_##TYPE v) | void atomic_##NAME##_barr_##TYPE(volatile u_##TYPE *p, u_##TYPE v) | ||||
int atomic_cmpset_char(volatile u_char *dst, u_char expect, u_char src); | int atomic_cmpset_char(volatile u_char *dst, u_char expect, u_char src); | ||||
int atomic_cmpset_short(volatile u_short *dst, u_short expect, u_short src); | int atomic_cmpset_short(volatile u_short *dst, u_short expect, u_short src); | ||||
int atomic_cmpset_int(volatile u_int *dst, u_int expect, u_int src); | int atomic_cmpset_int(volatile u_int *dst, u_int expect, u_int src); | ||||
int atomic_fcmpset_char(volatile u_char *dst, u_char *expect, u_char src); | int atomic_fcmpset_char(volatile u_char *dst, u_char *expect, u_char src); | ||||
▲ Show 20 Lines • Show All 791 Lines • Show Last 20 Lines |