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

Postby matrix » Wed Sep 18, 2013 2:02 pm

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

Postby matrix » Wed Sep 18, 2013 5:10 pm

select statement, have overlooked it.

Who is online

Users browsing this forum: No registered users and 3 guests