-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate eventfd to socketpair to support macOS #178
Conversation
Memory usage after merging this PR will be: Memory Reportaction_empty_test_c
action_microstep_test_c
action_overwrite_test_c
action_test_c
deadline_test_c
delayed_conn_test_c
event_payload_pool_test_c
event_queue_test_c
nanopb_test_c
port_test_c
reaction_queue_test_c
request_shutdown_test_c
startup_test_c
tcp_channel_test_c
timer_test_c
|
Benchmark results after merging this PR: Benchmark resultsPerformance:PingPongUc: PingPongC: ReactionLatencyUc: ReactionLatencyC: Memory usage:PingPongUc: PingPongC: ReactionLatencyUc: ReactionLatencyC: |
@@ -244,7 +243,7 @@ static lf_ret_t TcpIpChannel_send_blocking(NetworkChannel *untyped_self, const F | |||
switch (errno) { | |||
case ETIMEDOUT: | |||
case ENOTCONN: | |||
ssize_t bytes_written = eventfd_write(self->send_failed_event_fds, 1); | |||
ssize_t bytes_written = write(self->send_failed_event_fds[1], "X", 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does eventfd_write
really write an "X" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually it doesn't matter what you write you just need to write something and x is just one byte
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing this so quickly, it looks good to me!
Fixes #176