diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/chevents.c | 89 | ||||
-rw-r--r-- | src/include/events.h | 17 | ||||
-rw-r--r-- | src/include/threads.h | 2 | ||||
-rw-r--r-- | src/templates/chcore.h | 22 |
4 files changed, 0 insertions, 130 deletions
diff --git a/src/chevents.c b/src/chevents.c index 31a7500e6..e55cb759c 100644 --- a/src/chevents.c +++ b/src/chevents.c @@ -234,48 +234,6 @@ eventmask_t chEvtWaitAll(eventmask_t ewmask) { chSysUnlock();
return ewmask;
}
-
-/**
- * The function waits for an event and returns the event identifier, if an
- * event handler is specified then the handler is executed before returning.
- * @param ewmask mask of the events that should be served by the function,
- * \p ALL_EVENTS enables all the sources
- * @param handlers an array of \p evhandler_t. The array must be
- * have indexes from zero up the higher registered event
- * identifier. The array can be \p NULL or contain \p NULL
- * elements (no callbacks specified).
- * @return The event identifier.
- * @note Only a single event is served in the function, the one with the
- * lowest event id. The function is meant to be invoked into a loop so
- * that all events are received and served.<br>
- * This means that Event Listeners with a lower event identifier have
- * an higher priority.
- * @deprecated Please use \p chEvtWaitOne() and \p chEvtDispatch() instead,
- * this function will be removed in version 1.0.0.
- */
-eventid_t chEvtWait(eventmask_t ewmask,
- const evhandler_t handlers[]) {
- eventid_t i;
- eventmask_t m;
-
- chSysLock();
-
- if ((currp->p_epending & ewmask) == 0) {
- currp->p_ewmask = ewmask;
- chSchGoSleepS(PRWTOREVT);
- }
- i = 0, m = 1;
- while ((currp->p_epending & ewmask & m) == 0)
- i += 1, m <<= 1;
- currp->p_epending &= ~m;
-
- chSysUnlock();
-
- if (handlers && handlers[i])
- handlers[i](i);
-
- return i;
-}
#endif /* defined(CH_OPTIMIZE_SPEED) || !defined(CH_USE_EVENTS_TIMEOUT) */
#ifdef CH_USE_EVENTS_TIMEOUT
@@ -362,53 +320,6 @@ eventmask_t chEvtWaitAllTimeout(eventmask_t ewmask, systime_t time) { chSysUnlock();
return ewmask;
}
-
-/**
- * The function waits for an event or the specified timeout then returns the
- * event identifier, if an event handler is specified then the handler is
- * executed before returning.
- * @param ewmask mask of the events that should be served by the function,
- * \p ALL_EVENTS enables all the sources
- * @param handlers an array of \p evhandler_t. The array must be
- * have indexes from zero up the higher registered event
- * identifier. The array can be NULL or contain NULL elements
- * (no callback specified).
- * @param time the number of ticks before the operation timouts
- * @return The event identifier.
- * @retval RDY_TIMEOUT if the specified timeout expired.
- * @note Only a single event is served in the function, the one with the
- * lowest event id. The function is meant to be invoked into a loop so
- * that all events are received and served.<br>
- * This means that Event Listeners with a lower event identifier have
- * an higher priority.
- * @deprecated Please use \p chEvtWaitOneTimeout() and \p chEvtDispatch()
- * instead, this function will be removed in version 1.0.0.
- */
-eventid_t chEvtWaitTimeout(eventmask_t ewmask,
- const evhandler_t handlers[],
- systime_t time) {
- eventid_t i;
- eventmask_t m;
-
- chSysLock();
-
- if ((currp->p_epending & ewmask) == 0) {
- currp->p_ewmask = ewmask;
- if (chSchGoSleepTimeoutS(PRWTOREVT, time) < RDY_OK)
- return RDY_TIMEOUT;
- }
- i = 0, m = 1;
- while ((currp->p_epending & ewmask & m) == 0)
- i += 1, m <<= 1;
- currp->p_epending &= ~m;
-
- chSysUnlock();
-
- if (handlers && handlers[i])
- handlers[i](i);
-
- return i;
-}
#endif /* CH_USE_EVENTS_TIMEOUT */
#endif /* CH_USE_EVENTS */
diff --git a/src/include/events.h b/src/include/events.h index 0ebe9952a..49b551f45 100644 --- a/src/include/events.h +++ b/src/include/events.h @@ -52,10 +52,6 @@ typedef struct EventSource { EventListener *es_next;
} EventSource;
-/** Returns the event mask from the event identifier.
- * @deprecated use EVENT_MASK() instead.*/
-#define EventMask(eid) (1 << (eid))
-
/** Returns the event mask from the event identifier.*/
#define EVENT_MASK(eid) (1 << (eid))
@@ -76,7 +72,6 @@ typedef struct EventSource { #define chEvtIsListening(esp) \
((void *)(esp) != (void *)(esp)->es_next)
-
/** Event Handler callback function.*/
typedef void (*evhandler_t)(eventid_t);
@@ -94,16 +89,11 @@ extern "C" { eventmask_t chEvtWaitOne(eventmask_t ewmask);
eventmask_t chEvtWaitAny(eventmask_t ewmask);
eventmask_t chEvtWaitAll(eventmask_t ewmask);
- eventid_t chEvtWait(eventmask_t ewmask,
- const evhandler_t handlers[]);
#endif
#ifdef CH_USE_EVENTS_TIMEOUT
eventmask_t chEvtWaitOneTimeout(eventmask_t ewmask, systime_t time);
eventmask_t chEvtWaitAnyTimeout(eventmask_t ewmask, systime_t time);
eventmask_t chEvtWaitAllTimeout(eventmask_t ewmask, systime_t time);
- eventid_t chEvtWaitTimeout(eventmask_t ewmask,
- const evhandler_t handlers[],
- systime_t time);
#endif
#ifdef __cplusplus
}
@@ -126,15 +116,8 @@ extern "C" { #define chEvtWaitOne(ewmask) chEvtWaitOneTimeout(ewmask, TIME_INFINITE)
#define chEvtWaitAny(ewmask) chEvtWaitAnyTimeout(ewmask, TIME_INFINITE)
#define chEvtWaitAll(ewmask) chEvtWaitAllTimeout(ewmask, TIME_INFINITE)
-#define chEvtWait(ewmask, handlers) chEvtWaitTimeout(ewmask, handlers, TIME_INFINITE)
#endif
-/*
- * Old function names, deprecated, will be removed in some next release.
- */
-#define chEvtSend chEvtBroadcast
-#define chEvtSendI chEvtBroadcastI
-
#endif /* CH_USE_EVENTS */
#endif /* _EVENTS_H_ */
diff --git a/src/include/threads.h b/src/include/threads.h index 5b26a6535..b63636e63 100644 --- a/src/include/threads.h +++ b/src/include/threads.h @@ -183,8 +183,6 @@ extern "C" { Thread *chThdCreateFromMemoryPool(MemoryPool *mp, tprio_t prio, tfunc_t pf, void *arg); #endif - Thread *chThdCreate(tprio_t prio, tmode_t mode, void *workspace, - size_t wsize, tfunc_t pf, void *arg); void chThdSetPriority(tprio_t newprio); Thread *chThdResume(Thread *tp); void chThdSuspend(Thread **tpp); diff --git a/src/templates/chcore.h b/src/templates/chcore.h index 40a468b64..7690b7ce7 100644 --- a/src/templates/chcore.h +++ b/src/templates/chcore.h @@ -71,23 +71,9 @@ typedef struct { /**
* Enforces a correct alignment for a stack area size value.
- * @deprecated Use STACK_ALIGN() instead, this macro will be removed in
- * version 1.0.0.
- */
-#define StackAlign(n) STACK_ALIGN(n)
-
-/**
- * Enforces a correct alignment for a stack area size value.
*/
#define STACK_ALIGN(n) ((((n) - 1) | sizeof(stkalign_t)) + 1)
-/**
- * Computes the thread working area global size.
- * @deprecated Use THD_WA_SIZE() instead, this macro will be removed in
- * version 1.0.0.
- */
-#define UserStackSize(n) THD_WA_SIZE(n)
-
/**
* Computes the thread working area global size.
*/
@@ -99,14 +85,6 @@ typedef struct { /**
* Macro used to allocate a thread working area aligned as both position and
* size.
- * @deprecated Use WORKING_AREA() instead, this macro will be removed in
- * version 1.0.0.
- */
-#define WorkingArea(s, n) WORKING_AREA(s, n)
-
-/**
- * Macro used to allocate a thread working area aligned as both position and
- * size.
*/
#define WORKING_AREA(s, n) stkalign_t s[THD_WA_SIZE(n) / sizeof(stkalign_t)];
|