Skip to content

Commit

Permalink
Update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
P-p-H-d committed Mar 26, 2024
1 parent 7575681 commit 7bf9f6a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions m-concurrent.h
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,7 @@
struct M_F(name, _s) *self = out->self; \
while (true) { \
unsigned int num = atomic_load(&self->num_reader); \
/* FIXME: this lock is unfair for writers as readers may starve then */ \
if (num != 0 \
&& atomic_compare_exchange_strong(&self->num_reader, &num, num+1)) { \
break; \
Expand Down

0 comments on commit 7bf9f6a

Please sign in to comment.