diff --git a/m-concurrent.h b/m-concurrent.h index ceb1b56b..3568e972 100644 --- a/m-concurrent.h +++ b/m-concurrent.h @@ -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; \