aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/_rwlock.h
diff options
context:
space:
mode:
authorAttilio Rao <attilio@FreeBSD.org>2012-11-11 23:25:47 +0000
committerAttilio Rao <attilio@FreeBSD.org>2012-11-11 23:25:47 +0000
commit7b24b158a62479bcda9fb5af0c80189754274131 (patch)
treee7e6d7fd18a7e787bb18c2a20aa59ca2ba613d2f /sys/sys/_rwlock.h
parentef4b2bf30f2dc3ffbd0127f4be8f54b0368f5fb8 (diff)
downloadsrc-7b24b158a62479bcda9fb5af0c80189754274131.tar.gz
src-7b24b158a62479bcda9fb5af0c80189754274131.zip
Tweak comments.
In collabouration with: alc
Notes
Notes: svn path=/head/; revision=242901
Diffstat (limited to 'sys/sys/_rwlock.h')
-rw-r--r--sys/sys/_rwlock.h23
1 files changed, 11 insertions, 12 deletions
diff --git a/sys/sys/_rwlock.h b/sys/sys/_rwlock.h
index 7b8c6c06bbaa..c7cd572e759c 100644
--- a/sys/sys/_rwlock.h
+++ b/sys/sys/_rwlock.h
@@ -37,12 +37,11 @@
/*
* Reader/writer lock.
*
- * The layout of the first 2 members of struct rwlock* is considered fixed.
- * More specifically, it is assumed that there is a member called rw_lock
- * for every struct rwlock* and that other locking primitive structures are
- * not allowed to use such name for their members.
- * If this needs to change, the bits in the rwlock implementation might be
- * modified appropriately.
+ * All reader/writer lock implementations must always have a member
+ * called rw_lock. Other locking primitive structures are not allowed to
+ * use this name for their members.
+ * If this rule needs to change, the bits in the reader/writer lock
+ * implementation must be modified appropriately.
*/
struct rwlock {
struct lock_object lock_object;
@@ -51,12 +50,12 @@ struct rwlock {
/*
* Members of struct rwlock_padalign must mirror members of struct rwlock.
- * rwlock_padalign rwlocks can use rwlock(9) KPI transparently, without
- * modifies.
- * When using pad-aligned rwlocks within structures, they should generally
- * stay as the first member of the struct. This is because otherwise the
- * compiler can generate ever more padding for the struct to keep a correct
- * alignment for the rwlock.
+ * rwlock_padalign rwlocks can use the rwlock(9) API transparently without
+ * modification.
+ * Pad-aligned rwlocks used within structures should generally be the
+ * first member of the struct. Otherwise, the compiler can generate
+ * additional padding for the struct to keep a correct alignment for
+ * the rwlock.
*/
struct rwlock_padalign {
struct lock_object lock_object;