diff options
author | jhb <jhb@FreeBSD.org> | 2001-01-14 00:16:17 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-01-14 00:16:17 +0000 |
commit | 94588351ce2d8970ce221dba2766deee30ef192b (patch) | |
tree | 6028ab46e5728204454b966636f3a72dc0e83fbc /sys/amd64/include | |
parent | 458215f24caeff82031e99a7469297488333d8e7 (diff) | |
download | FreeBSD-src-94588351ce2d8970ce221dba2766deee30ef192b.zip FreeBSD-src-94588351ce2d8970ce221dba2766deee30ef192b.tar.gz |
Work around the broken atomic_store_rel_ptr() on the i386 arch by just
using atomic_cmpset_rel_ptr() instead for _release_lock_quick(). When
atomic_store_rel_ptr() is functional and MP safe, then this can be
reverted.
Diffstat (limited to 'sys/amd64/include')
-rw-r--r-- | sys/amd64/include/mutex.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/amd64/include/mutex.h b/sys/amd64/include/mutex.h index 95d117a..48a2a84 100644 --- a/sys/amd64/include/mutex.h +++ b/sys/amd64/include/mutex.h @@ -62,6 +62,10 @@ extern char STR_SIEN[]; #define mtx_legal2block() (read_eflags() & PSL_I) +/* Actually release mtx_lock quickly assuming that we own it */ +#define _release_lock_quick(mp) \ + atomic_cmpset_rel_int(&(mp)->mtx_lock, (mp)->mtx_lock, MTX_UNOWNED) + /* * Assembly macros (for internal use only) *------------------------------------------------------------------------------ |