Skip to content

Commit

Permalink
backport windows port of PR #144 (#182)
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Staschulat <[email protected]>
  • Loading branch information
JanStaschulat authored Aug 13, 2021
1 parent 35a034d commit d711b28
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions rclc/include/rclc/executor.h
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ rclc_executor_add_subscription(
* \return `RCL_RET_INVALID_ARGUMENT` if any parameter is a null pointer (NULL context is ignored)
* \return `RCL_RET_ERROR` if any other error occured
*/
RCLC_PUBLIC
rcl_ret_t
rclc_executor_add_subscription_with_context(
rclc_executor_t * executor,
Expand Down Expand Up @@ -504,6 +505,7 @@ rclc_executor_add_guard_condition(
* \return `RCL_RET_INVALID_ARGUMENT` if any parameter is a null pointer
* \return `RCL_RET_ERROR` if any other error occured
*/
RCLC_PUBLIC
rcl_ret_t
rclc_executor_remove_subscription(
rclc_executor_t * executor,
Expand Down Expand Up @@ -531,6 +533,7 @@ rclc_executor_remove_subscription(
* \return `RCL_RET_INVALID_ARGUMENT` if any parameter is a null pointer
* \return `RCL_RET_ERROR` if any other error occured
*/
RCLC_PUBLIC
rcl_ret_t
rclc_executor_remove_timer(
rclc_executor_t * executor,
Expand Down Expand Up @@ -558,6 +561,7 @@ rclc_executor_remove_timer(
* \return `RCL_RET_INVALID_ARGUMENT` if any parameter is a null pointer
* \return `RCL_RET_ERROR` if any other error occured
*/
RCLC_PUBLIC
rcl_ret_t
rclc_executor_remove_client(
rclc_executor_t * executor,
Expand Down Expand Up @@ -585,6 +589,7 @@ rclc_executor_remove_client(
* \return `RCL_RET_INVALID_ARGUMENT` if any parameter is a null pointer
* \return `RCL_RET_ERROR` if any other error occured
*/
RCLC_PUBLIC
rcl_ret_t
rclc_executor_remove_service(
rclc_executor_t * executor,
Expand All @@ -611,6 +616,7 @@ rclc_executor_remove_service(
* \return `RCL_RET_INVALID_ARGUMENT` if any parameter is a null pointer
* \return `RCL_RET_ERROR` if any other error occured
*/
RCLC_PUBLIC
rcl_ret_t
rclc_executor_remove_guard_condition(
rclc_executor_t * executor,
Expand Down
4 changes: 2 additions & 2 deletions rclc/test/rclc/test_executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1706,8 +1706,8 @@ TEST_F(TestDefaultExecutor, spin_period) {
}
// compute avarage time duration between calls to spin_period_callback
uint64_t duration = test_case_evaluate_spin_period();
printf("expected 'spin_period' : %ld ns\n", spin_period);
printf("actual (%d iterations) : %ld ns\n", TC_SPIN_PERIOD_MAX_INVOCATIONS, duration);
printf("expected 'spin_period' : %lu ns\n", spin_period);
printf("actual (%d iterations) : %lu ns\n", TC_SPIN_PERIOD_MAX_INVOCATIONS, duration);

uint64_t delta = 5000000; // 5 ms interval
EXPECT_LE(duration, spin_period + delta);
Expand Down

0 comments on commit d711b28

Please sign in to comment.