Thread Disjointness Rules for Arrays
-
- XCore Expert
- Posts: 956
- Joined: Fri Dec 11, 2009 3:53 am
- Location: Sweden, Eskilstuna
Since I started to use "my own defined" control token's in my code, things are different with the code efficiency.
Probably not the most confused programmer anymore on the XCORE forum.
-
- Experienced Member
- Posts: 126
- Joined: Fri Feb 12, 2010 10:31 pm
Hi lilltroll,lilltroll wrote:Since I started to use "my own defined" control token's in my code, things are different with the code efficiency.
Do you mean that you are using assembly to do channel I/O instead of the XC constructs? Is it working well for you?
Thanks
-
- XCore Expert
- Posts: 956
- Joined: Fri Dec 11, 2009 3:53 am
- Location: Sweden, Eskilstuna
I use the macros defined in the xs1.h, makes things easier with streaming or non streaming channels.
Test for control tokens can be used with branches without penalty, e.g. translates to 2 instruction including the branch.
like
while(!stestct(c))....
or
if(!stestct(c))...
c:> DATA
...
else
{read the control token and do something else}
Test for control tokens can be used with branches without penalty, e.g. translates to 2 instruction including the branch.
like
while(!stestct(c))....
or
if(!stestct(c))...
c:> DATA
...
else
{read the control token and do something else}
Probably not the most confused programmer anymore on the XCORE forum.