Skip to content
Snippets Groups Projects
Commit f380ca58 authored by Dmitry E. Oboukhov's avatar Dmitry E. Oboukhov
Browse files

has_readers & has_writers methods without race condition

parent 91b671f7
No related branches found
No related tags found
No related merge requests found
......@@ -194,13 +194,13 @@ ipc_channel_put(struct ipc_channel *ch, void *data)
bool
ipc_channel_has_readers(struct ipc_channel *ch)
{
return !rlist_empty(&ch->readers);
return ch->creaders > 0;
}
bool
ipc_channel_has_writers(struct ipc_channel *ch)
{
return !rlist_empty(&ch->writers);
return ch->cwriters > 0;
}
int
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment