Skip to content

Commit

Permalink
fix to MAKE on GCC 10+ (worked on RHEL 9 using GCC 11). Thanks to Net…
Browse files Browse the repository at this point in the history
  • Loading branch information
mcouillard committed Feb 23, 2024
1 parent db7590f commit 53db01d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/dyn_ring_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
#include "dyn_gossip.h"
#include "dyn_token.h"

_C2G_InQ C2G_InQ = {};
_C2G_OutQ C2G_OutQ = {};

// should use pooling to store struct ring_message so that we can reuse
struct ring_msg *create_ring_msg(void) {
struct ring_msg *msg = dn_alloc(sizeof(*msg));
Expand Down
11 changes: 7 additions & 4 deletions src/dyn_ring_queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,20 @@ struct gossip_node;
typedef rstatus_t (*callback_t)(void *msg);
typedef void (*data_func_t)(void *);

volatile struct {
typedef volatile struct {
long m_getIdx;
long m_putIdx;
void *m_entry[C2G_InQ_SIZE];
} C2G_InQ;
} _C2G_InQ;

volatile struct {
typedef volatile struct {
long m_getIdx;
long m_putIdx;
void *m_entry[C2G_OutQ_SIZE];
} C2G_OutQ;
} _C2G_OutQ;

extern _C2G_InQ C2G_InQ;
extern _C2G_OutQ C2G_OutQ;

struct ring_msg {
callback_t cb;
Expand Down

0 comments on commit 53db01d

Please sign in to comment.