Skip to content

Commit

Permalink
Trigger write barriers when setting IO_Event_Selector_EPoll_Descripto…
Browse files Browse the repository at this point in the history
…r.io (#118)

Fix: #113 (comment)

Co-authored-by: Jean Boussier <[email protected]>
  • Loading branch information
casperisfine and byroot authored Oct 4, 2024
1 parent bb032b0 commit 62a23d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/io/event/selector/epoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ int IO_Event_Selector_EPoll_Descriptor_update(struct IO_Event_Selector_EPoll *se
} else {
// The IO has changed, we need to reset the state:
epoll_descriptor->registered_events = 0;
epoll_descriptor->io = io;
RB_OBJ_WRITE(selector->backend.self, &epoll_descriptor->io, io);
}

if (epoll_descriptor->waiting_events == 0) {
Expand All @@ -251,7 +251,7 @@ int IO_Event_Selector_EPoll_Descriptor_update(struct IO_Event_Selector_EPoll *se
epoll_descriptor->registered_events = 0;
}

epoll_descriptor->io = 0;
RB_OBJ_WRITE(selector->backend.self, &epoll_descriptor->io, 0);

return 0;
}
Expand Down

0 comments on commit 62a23d5

Please sign in to comment.