Revision cd0cba58 src/urt_node.c

View differences:

src/urt_node.c
51 51
void _main(void* arg)
52 52
{
53 53
  urt_osEventMask_t mask;
54
  urt_osEventFlags_t flag;   //TODO: flag from core here
54
  urt_osEventFlags_t flag = 0;
55 55
  urtEventRegister(urtCoreGetEvtSource(), &localNode.listener, mask, flag);
56 56
  if (localNode.setupcallback != NULL)
57 57
  {
58 58
    mask = localNode.setupcallback(&localNode, arg);
59
    if (mask /*TODO: check single bits from mask to find out if bit for core is 1 */)
59
    if (mask == urtCoreGetEventMask())
60 60
    {
61 61
        urtCoreStopNodes(URT_STATUS_NODE_INVALEVTMASK);
62 62
    }
......
75 75
  if (terminated /*TODO: replace with function*/)
76 76
  {
77 77
    urt_osEventMask_t temp = urtEventWait(mask, URT_EVENT_WAIT_ONE, URT_DELAY_INFINITE);
78
    if (temp /*TODO: check single bits from mask to find out if bit for core is 1 */)
78
    if (temp == urtCoreGetEventMask())
79 79
    {
80 80
      localNode.loopcallback(&localNode, mask, arg);
81 81
      #if (URT_CFG_PUBSUB_PROFILING || URT_CFG_RPC_PROFILING)
82 82
        localNode.loops++;
83 83
      #endif /* URT_CFG_PUBSUB_PROFILING || URT_CFG_RPC_PROFILING */
84
      if (mask /*TODO: check single bits from mask to find out if bit for core is 1 */)
84
      if (mask == urtCoreGetEventMask())
85 85
      {
86 86
        urtCoreStopNodes(URT_STATUS_NODE_INVALEVTMASK);
87 87
      }

Also available in: Unified diff