Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix building and linking with GCC 10 #775

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/dyn_ring_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#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