diff options
author | Josef 'Jeff' Sipek <jeffpc@josefsipek.net> | 2015-12-20 23:52:23 -0500 |
---|---|---|
committer | Dan McDonald <danmcd@omniti.com> | 2016-01-05 15:38:23 -0500 |
commit | dc32d872cbeb56532bcea030255db9cd79bac7da (patch) | |
tree | 3094992b63b9d1bc8343415366dd0ed07a08a4f9 /usr/src/uts/common/vm/as.h | |
parent | f285096a3146a243a565abdce1ba710a9ce24b0b (diff) | |
download | illumos-joyent-dc32d872cbeb56532bcea030255db9cd79bac7da.tar.gz |
6514 AS_* lock macros simplification
Reviewed by: Piotr Jasiukajtis <estibi@me.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Albert Lee <trisk@omniti.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Diffstat (limited to 'usr/src/uts/common/vm/as.h')
-rw-r--r-- | usr/src/uts/common/vm/as.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/usr/src/uts/common/vm/as.h b/usr/src/uts/common/vm/as.h index d70c655f9c..22ceb82fae 100644 --- a/usr/src/uts/common/vm/as.h +++ b/usr/src/uts/common/vm/as.h @@ -240,19 +240,19 @@ extern struct as kas; /* kernel's address space */ * in rwlock.c for more information on the semantics of and motivation behind * RW_READER_STARVEWRITER.) */ -#define AS_LOCK_ENTER(as, lock, type) rw_enter((lock), \ +#define AS_LOCK_ENTER(as, type) rw_enter(&(as)->a_lock, \ (type) == RW_READER ? RW_READER_STARVEWRITER : (type)) -#define AS_LOCK_EXIT(as, lock) rw_exit((lock)) -#define AS_LOCK_DESTROY(as, lock) rw_destroy((lock)) -#define AS_LOCK_TRYENTER(as, lock, type) rw_tryenter((lock), \ +#define AS_LOCK_EXIT(as) rw_exit(&(as)->a_lock) +#define AS_LOCK_DESTROY(as) rw_destroy(&(as)->a_lock) +#define AS_LOCK_TRYENTER(as, type) rw_tryenter(&(as)->a_lock, \ (type) == RW_READER ? RW_READER_STARVEWRITER : (type)) /* * Macros to test lock states. */ -#define AS_LOCK_HELD(as, lock) RW_LOCK_HELD((lock)) -#define AS_READ_HELD(as, lock) RW_READ_HELD((lock)) -#define AS_WRITE_HELD(as, lock) RW_WRITE_HELD((lock)) +#define AS_LOCK_HELD(as) RW_LOCK_HELD(&(as)->a_lock) +#define AS_READ_HELD(as) RW_READ_HELD(&(as)->a_lock) +#define AS_WRITE_HELD(as) RW_WRITE_HELD(&(as)->a_lock) /* * macros to walk thru segment lists |