Commit 092aa589 authored by Federico Vaga's avatar Federico Vaga

wrtd:rt: fix loop data type

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>


NOTE
This commit has been created by `git subtree` on the Mock Turtle repository
on tag mock-turtle-2.0

This commit will not compile
parent 207f6f59
......@@ -19,7 +19,7 @@
#define LOOP_QUEUE_SIZE 16
static SMEM unsigned int head, tail, count;
static SMEM int head, tail, count;
static SMEM struct wrtd_trigger_entry buf[16];
void loop_queue_init()
......@@ -45,9 +45,9 @@ void loop_queue_push(struct wrtd_trig_id *id, uint32_t seq,
smem_atomic_add(&count, 1);
}
struct wrtd_trigger_entry *loop_queue_pop(void)
volatile struct wrtd_trigger_entry *loop_queue_pop(void)
{
struct wrtd_trigger_entry *rv;
volatile struct wrtd_trigger_entry *rv;
if (count == 0)
return NULL; /* No entry */
......
......@@ -23,8 +23,9 @@
#define LOOP_QUEUE_SIZE 16
void loop_queue_init();
void loop_queue_push(struct wrtd_trig_id *id, uint32_t seq, struct wr_timestamp *ts);
struct wrtd_trigger_entry *loop_queue_pop();
void loop_queue_push(struct wrtd_trig_id *id, uint32_t seq,
struct wr_timestamp *ts);
volatile struct wrtd_trigger_entry *loop_queue_pop(void);
#endif
......
......@@ -627,7 +627,8 @@ static void filter_trigger(struct wrtd_trigger_entry *trig)
void do_rx(void)
{
struct wrtd_trigger_entry *ent;
volatile struct wrtd_trigger_entry *ent;
struct wrtd_trigger_entry trig;
struct wrtd_trigger_message *msg;
int i;
......@@ -646,7 +647,8 @@ void do_rx(void)
/* Check from the loopback */
ent = loop_queue_pop();
if (ent) {
filter_trigger (ent);
trig = *ent;
filter_trigger (&trig);
wrtd_out_device.counter_loopback++;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment