Revision 792f6c74 src/urt_core.c

View differences:

src/urt_core.c
39 39
typedef struct urt_core
40 40
{
41 41
  urt_node_t* _nodes;
42
  urt_osEventSource_t* _evtSource;
42
  urt_osEventSource_t _evtSource;
43 43
  urt_osMutex_t _lock;
44 44
  urt_status_t _status;
45 45
  #if (URT_CFG_PUBSUB_ENABLED)
......
71 71
{
72 72
  core._nodes = NULL;
73 73
  core._status = URT_STATUS_OK;
74
  urtEventSourceInit(core._evtSource);
74
  urtEventSourceInit(&core._evtSource);
75 75
  urtMutexInit(&core._lock);
76 76
  #if (URT_CFG_PUBSUB_ENABLED)
77 77
    core._topics = NULL;
......
94 94

  
95 95
urt_osEventMask_t urtCoreGetEventMask(void)
96 96
{
97
    return EVENT_MASK(32);
97
    return URT_EVENTMASK_MAXPRIO;
98 98
}
99 99

  
100 100
/**
......
102 102
 *
103 103
 * @return  Current system mutex.
104 104
 */
105
urt_osMutex_t urtCoreGetMutex(void)
105
urt_osMutex_t* urtCoreGetMutex(void)
106 106
{
107
    return core._lock;
107
    return &core._lock;
108 108
}
109 109

  
110 110
/**
......
114 114
 */
115 115
urt_osEventSource_t* urtCoreGetEvtSource(void)
116 116
{
117
    return core._evtSource;
117
    return &core._evtSource;
118 118
}
119 119

  
120 120
urt_node_t* urtCoreGetNodes(void)
121 121
{
122
    return core._nodes;
122
    return &core._nodes;
123 123
}
124 124

  
125 125
/**
......
162 162
  if (nodeFromCore)
163 163
  {
164 164
    urt_osEventFlags_t flag = URT_EVENTFLAG_PROCEED;
165
    urtEventSourceBroadcast(core._evtSource, flag);
165
    urtEventSourceBroadcast(&core._evtSource, flag);
166 166
    urtMutexUnlock(&core._lock);
167 167
    return URT_STATUS_OK;
168 168
  }
......
209 209
      node = node->next;
210 210
    }
211 211
    urt_osEventFlags_t flag = URT_EVENTFLAG_TERMINATE;
212
    urtEventSourceBroadcast(core._evtSource, flag);
212
    urtEventSourceBroadcast(&core._evtSource, flag);
213 213
    urtMutexUnlock(&core._lock);
214 214
    if (priorityBoosted)
215 215
      core._nodes->thread->prio = oldPrio;

Also available in: Unified diff