Revision 8378a78b

View differences:

src/urt_node.c
70 70
  }
71 71

  
72 72

  
73
  while (/*!*/urtThreadShouldTerminate()) //TODO: uncomment
73
  while (urtThreadShouldTerminate())
74 74
  {
75 75
    urt_osEventMask_t temp = urtEventWait(mask, URT_EVENT_WAIT_ONE, URT_DELAY_INFINITE);
76 76
    if (temp == urtCoreGetEventMask())
......
92 92
  }
93 93
  urtEventUnregister(urtCoreGetEvtSource(), &((urt_node_t*)arg)->listener);
94 94
  urt_osThread_t* threadToTerminate = ((urt_node_t*)arg)->thread;
95
  //urt_osThread_t* threadToTerminate = urtThreadGetSelf();
95 96
  while (threadToTerminate->children != NULL || threadToTerminate->sibling != NULL)
96 97
  {
97 98
    if (threadToTerminate->children != NULL)
......
99 100
    if(threadToTerminate->sibling != NULL)
100 101
      urtThreadTerminate(threadToTerminate->sibling, URT_THREAD_TERMINATE_REQUEST);
101 102
  }
102
  urtThreadTerminate(threadToTerminate, URT_THREAD_TERMINATE_REQUEST);
103 103

  
104 104
  urt_osThread_t* threadToJoin = ((urt_node_t*)arg)->thread;
105 105
  while (threadToJoin->children != NULL || threadToJoin->sibling != NULL)
......
109 109
    if(threadToJoin->sibling != NULL)
110 110
      urtThreadJoin(threadToJoin->sibling);
111 111
  }
112
  //urtThreadJoin(threadToJoin); //TODO: uncomment
113 112

  
113
  urtThreadExit();
114 114
  return;
115 115
}
116 116

  
src/urt_subscriber.c
103 103
  subscriber->base.lastMessage = topic->latestMessage;
104 104
  subscriber->base.lastMessageTime = topic->latestMessage->originTime;
105 105

  
106
  urtEventRegister(topic->evtSource, subscriber->base.evtListener, URT_EVENTMASK_MAXPRIO, URT_EVENTFLAG_PROCEED); //TODO: Correct mask, flag?
106
  urtEventRegister(topic->evtSource, subscriber->base.evtListener, subscriber->base.evtListener.events, subscriber->base.evtListener.flags);
107 107

  
108 108
#if (URT_CFG_PUBSUB_PROFILING == true)
109 109
    topic->numHrtSubscribers--;
......
253 253
  subscriber->base.lastMessage = topic->latestMessage;
254 254
  subscriber->base.lastMessageTime = topic->latestMessage->originTime;
255 255

  
256
  urtEventRegister(topic->evtSource, subscriber->base.evtListener, URT_EVENTMASK_MAXPRIO, URT_EVENTFLAG_PROCEED); //TODO: Correct mask, flag?
256
  urtEventRegister(topic->evtSource, subscriber->base.evtListener, subscriber->base.evtListener.events, subscriber->base.evtListener.flags);
257 257

  
258 258
# if (URT_CFG_PUBSUB_PROFILING == true)
259 259
    topic->numHrtSubscribers--;
......
433 433
  subscriber->base.lastMessage = topic->latestMessage;
434 434
  subscriber->base.lastMessageTime = topic->latestMessage->originTime;
435 435

  
436
  urtEventRegister(topic->evtSource, subscriber->base.evtListener, URT_EVENTMASK_MAXPRIO, URT_EVENTFLAG_PROCEED); //TODO: Correct mask, flag?
436
  urtEventRegister(topic->evtSource, subscriber->base.evtListener, subscriber->base.evtListener.events, subscriber->base.evtListener.flags);
437 437

  
438 438
# if (URT_CFG_PUBSUB_PROFILING == true)
439 439
  topic->numHrtSubscribers--;
......
631 631
  subscriber->base.lastMessage = topic->latestMessage;
632 632
  subscriber->base.lastMessageTime = topic->latestMessage->originTime;
633 633

  
634
  urtEventRegister(topic->evtSource, subscriber->base.evtListener, URT_EVENTMASK_MAXPRIO, URT_EVENTFLAG_PROCEED); //TODO: Correct mask, flag?
634
  urtEventRegister(topic->evtSource, subscriber->base.evtListener, subscriber->base.evtListener.events, subscriber->base.evtListener.flags);
635 635

  
636 636
# if(URT_CFG_PUBSUB_QOS_RATECHECKS == true)
637
  urt_hrtsubscriber_t* hrtSubscriber = subscriber->base.topic->hrtSubscribers;
638
  while (!hrtSubscriber /* && expected Rate is lower */)
639
  {
640
      hrtSubscriber = hrtSubscriber->next;
641
  }
642

  
643
  if (!hrtSubscriber)
644
  {
645
    //TODO: Append self to topic's list of HRT subscribers
646
  }
647
  else
648
  {
649
    //TOOD: insert self in front of current HRT susbcriber
650
    subscriber->next = hrtSubscriber;
651
  }
637
  //TODO: Implement
652 638
# endif /* URT_CFG_PUBSUB_QOS_RATECHECKS */
653 639

  
654 640
  topic->numHrtSubscribers--;

Also available in: Unified diff