Skip to content

Commit

Permalink
use alternative atomic init for Windows support
Browse files Browse the repository at this point in the history
  • Loading branch information
wjwwood committed Nov 21, 2018
1 parent 363295a commit 80fca94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rcl/src/rcl/context.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ rcl_get_zero_initialized_context(void)
sizeof(context.instance_id_storage) >= sizeof(atomic_uint_least64_t),
"expected rcl_context_t's instance id storage to be >= size of atomic_uint_least64_t");
// initialize atomic
*((atomic_uint_least64_t *)(&context.instance_id_storage)) = ATOMIC_VAR_INIT(0);
atomic_init((atomic_uint_least64_t *)(&context.instance_id_storage), 0);
return context;
}

Expand Down

0 comments on commit 80fca94

Please sign in to comment.