Skip to content
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

Clarify that NULL blocks forever in rmw_wait #134

Merged
merged 2 commits into from
Jan 24, 2018

Conversation

sloretz
Copy link
Contributor

@sloretz sloretz commented Jan 24, 2018

The documentation says rmw_wait() blocks forever if the timeout is negative, but the timeout cannot be negative because rmw_time_t uses unsigned types.

typedef struct RMW_PUBLIC_TYPE rmw_time_t
{
  uint64_t sec;
  uint64_t nsec;
} rmw_time_t;

If ros2/rcutils#79 leads to rclutils_time_point_value_t using a signed type then it may make sense to propagate signed-ness down to rmw, but either way this documentation should still say it blocks when the time pointer passed in is NULL.

CI Linux, only testing rmw for any linter tests since this is a documentation change only

  • Linux Build Status

@sloretz sloretz added the in review Waiting for review (Kanban column) label Jan 24, 2018
@wjwwood
Copy link
Member

wjwwood commented Jan 24, 2018

This is the simplest change, but long term we should probably switch to rcutils_duration_value_t and remove the rmw_time_t.

@sloretz sloretz merged commit e8799d7 into master Jan 24, 2018
@sloretz sloretz deleted the doc_null_timeout_rmw_wait branch January 24, 2018 18:58
@sloretz sloretz removed the in review Waiting for review (Kanban column) label Jan 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants