diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2007-12-02 21:21:31 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2007-12-02 21:21:31 +0000 |
commit | 1650e61219b0f085938ffd3529b18f122e371efd (patch) | |
tree | 872abb896c319c905210f0d4c4a335069a857a7f /sys/arch/m88k/include/lock.h | |
parent | 9ddcf1d8e7bdf80e4736afe986c5f0d16cb79111 (diff) |
Provide a specific rw_cas() function for MP kernels, simulating a really
atomic compare-and-swap operation.
Diffstat (limited to 'sys/arch/m88k/include/lock.h')
-rw-r--r-- | sys/arch/m88k/include/lock.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/arch/m88k/include/lock.h b/sys/arch/m88k/include/lock.h index 13bfc2d0960..06eebcfaf2d 100644 --- a/sys/arch/m88k/include/lock.h +++ b/sys/arch/m88k/include/lock.h @@ -1,6 +1,6 @@ #ifndef _M88K_LOCK_H_ #define _M88K_LOCK_H_ -/* $OpenBSD: lock.h,v 1.5 2007/10/27 20:36:17 miod Exp $ */ +/* $OpenBSD: lock.h,v 1.6 2007/12/02 21:21:29 miod Exp $ */ /* * Copyright (c) 2005, Miodrag Vallat. @@ -81,4 +81,9 @@ __cpu_simple_unlock(__cpu_simple_lock_t *l) *l = __SIMPLELOCK_UNLOCKED; } +#if defined(_KERNEL) && defined(MULTIPROCESSOR) +int rw_cas_m88k(volatile unsigned long *, unsigned long, unsigned long); +#define rw_cas rw_cas_m88k +#endif + #endif /* _M88K_LOCK_H_ */ |