Event starve. Topic is solved

Technical questions regarding the XTC tools and programming with XMOS.
Endre
Active Member
Posts: 38
Joined: Fri Jan 01, 2016 10:13 am

Event starve.

Post by Endre »

Hi,

If a core runs a code something like this:

Code: Select all

while (1) {
  select {
    case ifaceA.put(char ch):
      ...
      break;
    case ifaceB.put(char ch):
      ...
      break;
  }
}
There are 2 other cores: A and B. A continuously calls ifaceA.put(), B continuously calls ifaceB.put().
In this case what happens? Can one case block/starve the other? Is there some scheduling implemented in event processing?
View Solution
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am

Post by mon2 »

Endre
Active Member
Posts: 38
Joined: Fri Jan 01, 2016 10:13 am

Post by Endre »

AN10016 seems to solve this issue but it also adds performance penalty and a little bit bloated xC code.
Isn't it planed in the future to add hardware support for Round-robin like event scheduling?
I guess it would be also good to execute all involved "case"-es, one after the other, when the "select" is unblocked by multiple events.