Skip to content

Commit

Permalink
use wait set in doc
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelarguedas committed Nov 24, 2017
1 parent f7a5c41 commit 6ec1aea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions rmw_fastrtps_cpp/src/rmw_wait.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ rmw_wait(
const rmw_time_t * wait_timeout)
{
if (!wait_set) {
RMW_SET_ERROR_MSG("Waitset handle is null");
RMW_SET_ERROR_MSG("wait set handle is null");
return RMW_RET_ERROR;
}
CustomWaitsetInfo * wait_set_info = static_cast<CustomWaitsetInfo *>(wait_set->data);
Expand All @@ -97,11 +97,11 @@ rmw_wait(
std::mutex * conditionMutex = &wait_set_info->condition_mutex;
std::condition_variable * conditionVariable = &wait_set_info->condition;
if (!conditionMutex) {
RMW_SET_ERROR_MSG("Mutex for wait_set was null");
RMW_SET_ERROR_MSG("Mutex for wait set was null");
return RMW_RET_ERROR;
}
if (!conditionVariable) {
RMW_SET_ERROR_MSG("Condition variable for wait_set was null");
RMW_SET_ERROR_MSG("Condition variable for wait set was null");
return RMW_RET_ERROR;
}

Expand Down
10 changes: 5 additions & 5 deletions rmw_fastrtps_cpp/src/rmw_wait_set.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ rmw_create_wait_set(size_t max_conditions)

// From here onward, error results in unrolling in the goto fail block.
if (!wait_set) {
RMW_SET_ERROR_MSG("failed to allocate wait_set");
RMW_SET_ERROR_MSG("failed to allocate wait set");
goto fail;
}
wait_set->implementation_identifier = eprosima_fastrtps_identifier;
Expand All @@ -40,7 +40,7 @@ rmw_create_wait_set(size_t max_conditions)
wait_set_info = static_cast<CustomWaitsetInfo *>(wait_set->data);
RMW_TRY_PLACEMENT_NEW(wait_set_info, wait_set_info, goto fail, CustomWaitsetInfo, )
if (!wait_set_info) {
RMW_SET_ERROR_MSG("failed to construct wait_set info struct");
RMW_SET_ERROR_MSG("failed to construct wait set info struct");
goto fail;
}

Expand All @@ -62,7 +62,7 @@ rmw_ret_t
rmw_destroy_wait_set(rmw_wait_set_t * wait_set)
{
if (!wait_set) {
RMW_SET_ERROR_MSG("wait_set handle is null");
RMW_SET_ERROR_MSG("wait set handle is null");
return RMW_RET_ERROR;
}
RMW_CHECK_TYPE_IDENTIFIERS_MATCH(
Expand All @@ -73,12 +73,12 @@ rmw_destroy_wait_set(rmw_wait_set_t * wait_set)
auto result = RMW_RET_OK;
auto wait_set_info = static_cast<CustomWaitsetInfo *>(wait_set->data);
if (!wait_set_info) {
RMW_SET_ERROR_MSG("wait_set info is null");
RMW_SET_ERROR_MSG("wait set info is null");
return RMW_RET_ERROR;
}
std::mutex * conditionMutex = &wait_set_info->condition_mutex;
if (!conditionMutex) {
RMW_SET_ERROR_MSG("wait_set mutex is null");
RMW_SET_ERROR_MSG("wait set mutex is null");
return RMW_RET_ERROR;
}

Expand Down

0 comments on commit 6ec1aea

Please sign in to comment.