-
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
Remove ioctl from TcpIpChannel #61
Conversation
Memory usage after merging this PR will be: Memory Reportaction_test_c
delayed_conn_test_c
event_queue_test_c
physical_action_test_c
port_test_c
reaction_queue_test_c
shutdown_test_c
startup_test_c
timer_test_c
trigger_value_test_c
|
src/platform/posix/tcp_ip_channel.c
Outdated
timeout.tv_usec = 0; | ||
|
||
// check if data is available | ||
int select_result = select(socket + 1, &read_fds, NULL, NULL, &timeout); |
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.
I just gonna copy your comment from my previous PR to keep track of it:
@erlingrj wrote:
Do we actually need to check how much data is there before we read? Since this is running in a separate thread, we want it to block on recv and return with as much data is available. What is gained from checking how much data is there before the read?
(I know that this was there before your edits, and perhaps @tanneberger can answer better?)
Is this still a Draft or should we consider it for merging, @LasseRosenow? I like this approach since I can use it for Zephyr also |
Memory usage after merging this PR will be: Memory Reportaction_microstep_test_c
action_test_c
delayed_conn_test_c
event_queue_test_c
physical_action_test_c
port_test_c
reaction_queue_test_c
shutdown_test_c
startup_test_c
timer_test_c
trigger_data_queue_test_c
|
Memory usage after merging this PR will be: Memory Reportaction_microstep_test_c
action_test_c
delayed_conn_test_c
event_queue_test_c
physical_action_test_c
port_test_c
reaction_queue_test_c
shutdown_test_c
startup_test_c
timer_test_c
trigger_data_queue_test_c
|
I will add more examples to RIOT today and see if I can test if everything still works correctly and undraft it :) |
Memory usage after merging this PR will be: Memory Reportaction_microstep_test_c
action_test_c
delayed_conn_test_c
event_queue_test_c
physical_action_test_c
port_test_c
reaction_queue_test_c
shutdown_test_c
startup_test_c
timer_test_c
trigger_data_queue_test_c
|
@LasseRosenow I am merging this because I have some other work based off this branch that I want to merge. I hope this doesn't cause any problems for you |
This changes the TcpIpChannel implementation in the following way
ioctl.h
=>sys/select.h
close
instead ofshutdown
, which is not available inRIOT
The rationale behind this is to improve compatibility with platforms such as
zephyr
orRIOT
which don't have full POSIX support.This PR is a draft because I didn't have time to test it yet. There might be implementation bugs.
(I had some problems with compiling the example applications in examples/posix)