Thread Disjointness Rules for Arrays

Technical questions regarding the XTC tools and programming with XMOS.
User avatar
lilltroll
XCore Expert
Posts: 956
Joined: Fri Dec 11, 2009 3:53 am
Location: Sweden, Eskilstuna

Post by lilltroll »

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.
User avatar
bsmithyman
Experienced Member
Posts: 126
Joined: Fri Feb 12, 2010 10:31 pm
Contact:

Post by bsmithyman »

lilltroll wrote:Since I started to use "my own defined" control token's in my code, things are different with the code efficiency.
Hi lilltroll,

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
User avatar
lilltroll
XCore Expert
Posts: 956
Joined: Fri Dec 11, 2009 3:53 am
Location: Sweden, Eskilstuna

Post by lilltroll »

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}
Probably not the most confused programmer anymore on the XCORE forum.
Post Reply