xcore/sw_avb — pull request #29 by davelxmos (2013-11-30 10:29:04+00:00)
Title: Fix alias pointer passing bug.

In xC if a function argument is restricted pointer and the function
accesses a global then you cannot pass a non-local alias pointer
(e.g. an alias pointer to a global). This is because the pointer then
may alias the global accessed in the function (which it shouldn't since
it is a restricted pointer.

This is happening in the code where a pointer to a global is taken:

avb_1722_1_acmp_inflight_command *inflight =
&acmp_listener_inflight_commands[i];

and then this is passed into a function that accesses a global:

acmp_send_command(... &inflight->command ...);

This commit fixes this by explictly marking the parameter to
acmp_send_command as aliased. The 13.0.0 compiler has a bug which means
it does not spot this error yet but this fix is to safeguard the code when
the compiler is fixed.