-typedef struct {
- hw_lock_data_t interlock;
- volatile unsigned int
- read_count:16, /* No. of accepted readers */
- want_upgrade:1, /* Read-to-write upgrade waiting */
- want_write:1, /* Writer is waiting, or locked for write */
- waiting:1, /* Someone is sleeping on lock */
- can_sleep:1; /* Can attempts to lock go to sleep? */
- unsigned int lck_rw_tag;
+#pragma pack(1) /* Make sure the structure stays as we defined it */
+typedef struct _lck_rw_t_internal_ {
+ volatile uint16_t lck_rw_shared_count; /* No. of accepted readers */
+ volatile uint8_t lck_rw_interlock; /* Interlock byte */
+ volatile uint8_t
+ lck_rw_priv_excl:1, /* Writers prioritized if set */
+ lck_rw_want_upgrade:1, /* Read-to-write upgrade waiting */
+ lck_rw_want_write:1, /* Writer waiting or locked for write */
+ lck_r_waiting:1, /* Reader is sleeping on lock */
+ lck_w_waiting:1, /* Writer is sleeping on lock */
+ lck_rw_can_sleep:1, /* Can attempts to lock go to sleep? */
+ lck_rw_padb6:2; /* padding */
+
+ uint32_t lck_rw_tag; /* This can be obsoleted when stats
+ * are in
+ */
+ uint32_t lck_rw_pad8;
+ uint32_t lck_rw_pad12;