chEvtAddEvents(), I/S class versions please Topic is solved
chEvtAddEvents(), I/S class versions please Topic is solved
It would be good to have an S class versions of the chEvtAddEvents function. I usually use it in a context where I'm already in a chSysLock() state.
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: chEvtAddEvents(), I/S class versions please
Another one: chEvtGetAndClearEvents, I class version please .
Code: Select all
eventmask_t chEvtGetAndClearEventsI(eventmask_t events) {
eventmask_t m;
m = currp->epending & events;
currp->epending &= ~events;
return m;
}
/**
* @brief Clears the pending events specified in the events mask.
*
* @param[in] events the events to be cleared
* @return The mask of pending events that were cleared.
*
* @api
*/
eventmask_t chEvtGetAndClearEvents(eventmask_t events) {
eventmask_t m;
chSysLock();
m = chEvtGetAndClearEventsI(events);
chSysUnlock();
return m;
}
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Return to “Small Change Requests”
Who is online
Users browsing this forum: No registered users and 6 guests