Added terminate event replacing the old terminate API.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8907 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
03ad1caa98
commit
84f7aa84b3
|
@ -37,6 +37,14 @@
|
|||
/* Module constants. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Event bit reserved for thread termination request.
|
||||
* @note The most significant bit of the events mask is conventionally
|
||||
* used for thread termination but it can eventually be used for
|
||||
* other events.
|
||||
*/
|
||||
#define CH_EVENT_TERMINATE ~(((eventmask_t)-1) >> 1U)
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Module pre-compile time settings. */
|
||||
/*===========================================================================*/
|
||||
|
@ -256,6 +264,19 @@ static inline void chEvtBroadcastI(event_source_t *esp) {
|
|||
chEvtBroadcastFlagsI(esp, (eventflags_t)0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns the events mask.
|
||||
* @details The pending events mask is returned but not altered in any way.
|
||||
*
|
||||
* @return The pending events mask.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
static inline eventmask_t chEvtGetEventsX(void) {
|
||||
|
||||
return currp->epending;
|
||||
}
|
||||
|
||||
#endif /* CH_CFG_USE_EVENTS == TRUE */
|
||||
|
||||
#endif /* _CHEVENTS_H_ */
|
||||
|
|
|
@ -155,7 +155,7 @@ void chEvtUnregister(event_source_t *esp, event_listener_t *elp) {
|
|||
* @brief Clears the pending events specified in the events mask.
|
||||
*
|
||||
* @param[in] events the events to be cleared
|
||||
* @return The pending events that were cleared.
|
||||
* @return The mask of pending events that were cleared.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
|
@ -175,7 +175,7 @@ eventmask_t chEvtGetAndClearEvents(eventmask_t events) {
|
|||
* @b much faster than using @p chEvtBroadcast() or @p chEvtSignal().
|
||||
*
|
||||
* @param[in] events the events to be added
|
||||
* @return The current pending events.
|
||||
* @return The mask of currently pending events.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue