Commit 2868d6fe authored by Federico Vaga's avatar Federico Vaga

tst:fw:rmq: FIX claim returns 0 on success

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 27e6198c
...@@ -36,9 +36,11 @@ uint32_t rx_errors = 0; ...@@ -36,9 +36,11 @@ uint32_t rx_errors = 0;
void send_reply(int cpu_id, int rmq, int payload_len) void send_reply(int cpu_id, int rmq, int payload_len)
{ {
struct trtl_fw_msg msg; struct trtl_fw_msg msg;
int err;
// queue full? wait // queue full? wait
if (!mq_claim(TRTL_RMQ, rmq)) err = mq_claim(TRTL_RMQ, rmq);
if (err < 0)
return; return;
mq_map_out_message(TRTL_RMQ, rmq, &msg); mq_map_out_message(TRTL_RMQ, rmq, &msg);
......
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