Update use of shared memory to abide by parallel usage rules

This commit is contained in:
Dave Lacey
2012-04-17 16:01:40 +01:00
parent b900002f84
commit 579c09546e
6 changed files with 188 additions and 132 deletions

View File

@@ -3,7 +3,12 @@
typedef unsigned int xc_ptr;
inline xc_ptr array_to_xc_ptr(unsigned a[]) {
// Note that this function is marked as const to avoid the XC
// parallel usage checks, this is only really going to work if this
// is the *only* way the array a is accessed (and everything else uses
// the xc_ptr)
inline xc_ptr array_to_xc_ptr(const unsigned a[])
{
xc_ptr x;
asm("mov %0, %1":"=r"(x):"r"(a));
return x;