Changes in kernel/generic/src/ipc/event.c [97d42d5:0496c17] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/event.c
r97d42d5 r0496c17 59 59 events[i].imethod = 0; 60 60 events[i].masked = false; 61 events[i].unmask_c allback= NULL;61 events[i].unmask_cb = NULL; 62 62 } 63 63 } … … 86 86 /** Define a callback function for the event unmask event. 87 87 * 88 * @param evno Event type. 89 * @param callback Callback function to be called when 90 * the event is unmasked. 91 * 92 */ 93 void event_set_unmask_callback(event_type_t evno, event_callback_t callback) 94 { 95 ASSERT(evno < EVENT_END); 96 97 spinlock_lock(&events[evno].lock); 98 events[evno].unmask_callback = callback; 88 * @param evno Event type. 89 * @param cb Callback function to be called when the event is unmasked. 90 * 91 */ 92 void event_set_unmask_callback(event_type_t evno, void (*cb)(void)) 93 { 94 ASSERT(evno < EVENT_END); 95 96 spinlock_lock(&events[evno].lock); 97 events[evno].unmask_cb = cb; 99 98 spinlock_unlock(&events[evno].lock); 100 99 } … … 207 206 static void event_unmask(event_type_t evno) 208 207 { 208 void (*cb)(void); 209 209 ASSERT(evno < EVENT_END); 210 210 211 211 spinlock_lock(&events[evno].lock); 212 212 events[evno].masked = false; 213 event_callback_t callback = events[evno].unmask_callback;213 cb = events[evno].unmask_cb; 214 214 spinlock_unlock(&events[evno].lock); 215 215 216 216 /* 217 * Check if there is an unmask callback 218 * function defined for this event. 217 * Check if there is an unmask callback function defined for this event. 219 218 */ 220 if (c allback != NULL)221 callback();219 if (cb) 220 cb(); 222 221 } 223 222
Note:
See TracChangeset
for help on using the changeset viewer.