-typedef struct {
- volatile unsigned char mutex; // 1 = busy
- volatile unsigned char write:1; // 1 = exclusive
- volatile unsigned char readwait:1; // readers are waiting
- volatile unsigned char writewait:1; // writers are waiting
- volatile unsigned char filler:5;
- volatile ushort share; // count of readers holding locks
- volatile ushort rcnt; // count of waiting readers
- volatile ushort wcnt; // count of waiting writers
+volatile typedef struct {
+ unsigned char mutex[1]; // 1 = busy
+ unsigned char write:1; // 1 = exclusive
+ unsigned char readwait:1; // readers are waiting
+ unsigned char writewait:1; // writers are waiting
+ unsigned char filler:5;
+ ushort share; // count of readers holding locks
+ ushort rcnt; // count of waiting readers
+ ushort wcnt; // count of waiting writers