Skip to content

Commit

Permalink
check to see if we have easy access to atomics
Browse files Browse the repository at this point in the history
  • Loading branch information
exarkun committed Sep 14, 2023
1 parent 5b31be3 commit 2341a71
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions zfec/fec.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <stdatomic.h>

/*
* Primitive polynomials - see Lin & Costello, Appendix A,
Expand Down Expand Up @@ -395,6 +396,9 @@ _invert_vdm (gf* src, unsigned k) {

static int fec_initialized = 0;

/* Just checking to see if this compiles everywhere */
static atomic_flag compiler_test = ATOMIC_FLAG_INIT;

void
fec_init (void) {
if (fec_initialized == 0) {
Expand Down

0 comments on commit 2341a71

Please sign in to comment.