Changeset c9f0975 in mainline for kernel/generic/src/ipc/event.c
- Timestamp:
- 2011-06-01T10:04:32Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 65c3794
- Parents:
- 049a16f (diff), df29f24 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/event.c
r049a16f rc9f0975 59 59 events[i].imethod = 0; 60 60 events[i].masked = false; 61 events[i].unmask_c b= NULL;61 events[i].unmask_callback = 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 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; 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; 98 99 spinlock_unlock(&events[evno].lock); 99 100 } … … 206 207 static void event_unmask(event_type_t evno) 207 208 { 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 cb = events[evno].unmask_cb;213 event_callback_t callback = events[evno].unmask_callback; 214 214 spinlock_unlock(&events[evno].lock); 215 215 216 216 /* 217 * Check if there is an unmask callback function defined for this event. 217 * Check if there is an unmask callback 218 * function defined for this event. 218 219 */ 219 if (c b)220 cb();220 if (callback != NULL) 221 callback(); 221 222 } 222 223
Note:
See TracChangeset
for help on using the changeset viewer.