Communicating with multiple cores

New to XMOS and XCore? Get started here.
User avatar
matrix
Active Member
Posts: 62
Joined: Sat Sep 17, 2011 12:05 pm

Communicating with multiple cores

Post by matrix »

Hi All,

I want to connect two producer threads with one worker
thread, and it should be non-blocking. Just can't figure out
how to do it. Code as below in the worker would block, right?

Thanks for hints

Code: Select all

void worker(chanend e1,chanend e2)
{
unsigned data1;
unsigned data2;
.

while(1)
{
 e1:>data1;
 e2:>data2;
 //process data
}

}
(Mod edit: Edited subject)


User avatar
matrix
Active Member
Posts: 62
Joined: Sat Sep 17, 2011 12:05 pm

Post by matrix »

select statement, have overlooked it.