Commit 5b730885 authored by Antoine Kaufmann's avatar Antoine Kaufmann
Browse files

libnicbm: don't abort on full d2h,d2n queues instead retry

parent 4a2f044a
...@@ -34,22 +34,18 @@ static void sigusr1_handler(int dummy) ...@@ -34,22 +34,18 @@ static void sigusr1_handler(int dummy)
volatile union cosim_pcie_proto_d2h *Runner::d2h_alloc(void) volatile union cosim_pcie_proto_d2h *Runner::d2h_alloc(void)
{ {
volatile union cosim_pcie_proto_d2h *msg = volatile union cosim_pcie_proto_d2h *msg;
nicsim_d2h_alloc(&nsparams, main_time); while ((msg = nicsim_d2h_alloc(&nsparams, main_time)) == NULL) {
if (msg == NULL) {
fprintf(stderr, "d2h_alloc: no entry available\n"); fprintf(stderr, "d2h_alloc: no entry available\n");
abort();
} }
return msg; return msg;
} }
volatile union cosim_eth_proto_d2n *Runner::d2n_alloc(void) volatile union cosim_eth_proto_d2n *Runner::d2n_alloc(void)
{ {
volatile union cosim_eth_proto_d2n *msg = volatile union cosim_eth_proto_d2n *msg;
nicsim_d2n_alloc(&nsparams, main_time); while ((msg = nicsim_d2n_alloc(&nsparams, main_time)) == NULL) {
if (msg == NULL) {
fprintf(stderr, "d2n_alloc: no entry available\n"); fprintf(stderr, "d2n_alloc: no entry available\n");
abort();
} }
return msg; return 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