Skip to content

Commit

Permalink
Use same methods in feature test as in source
Browse files Browse the repository at this point in the history
  • Loading branch information
lrstewart committed Jun 15, 2023
1 parent b113101 commit 15445c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/features/S2N_ATOMIC_SUPPORTED.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

int main() {
/* Atomic builtins are supported by gcc 4.7.3 and later. */
sig_atomic_t atomic = 0;
__atomic_test_and_set(&atomic, __ATOMIC_RELAXED);
__atomic_clear(&atomic, __ATOMIC_RELAXED);
sig_atomic_t atomic = 0, value = 1;
__atomic_store(&atomic, &value, __ATOMIC_RELAXED);
__atomic_load(&atomic, &value, __ATOMIC_RELAXED);

/* _Static_assert is supported for C99 by gcc 4.6 and later,
* so using it here shouldn't limit use of the atomic builtins. */
Expand Down

0 comments on commit 15445c2

Please sign in to comment.