Skip to content

Commit

Permalink
Merge branch 'cpp_fixes' into cpp_fixes+exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
dkfellows committed May 17, 2017
2 parents a2883d4 + 755e054 commit 133c47d
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions scamp/scamp-3.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,11 @@ void proc_route_msg (uint arg1, uint arg2);

void msg_queue_insert (sdp_msg_t *msg, uint srce_ip)
{
event_queue_proc (proc_route_msg, (uint) msg, srce_ip, PRIO_0);
if (event_queue_proc (proc_route_msg, (uint) msg, srce_ip, PRIO_0) == 0)
{
// if no event is queued free SDP msg buffer
sark_msg_free (msg);
}
}


Expand Down Expand Up @@ -1578,8 +1582,11 @@ void c_main (void)

while (1) // Run event loop (forever...)
{
event_run (1);
cpu_wfi ();
event_run (0);
if (event.proc_queue->proc_head == NULL)
{
cpu_wfi ();
}
}
}

Expand Down

0 comments on commit 133c47d

Please sign in to comment.