diff options
-rw-r--r-- | demos/Win32-MinGW/chcore.h | 3 | ||||
-rw-r--r-- | docs/reports/LPC2148-48-ARM.txt | 14 | ||||
-rw-r--r-- | ports/ARM7/chcore.h | 3 | ||||
-rw-r--r-- | ports/ARMCM3/chcore.h | 4 | ||||
-rw-r--r-- | ports/AVR/chcore.h | 3 | ||||
-rw-r--r-- | ports/MSP430/chcore.h | 3 | ||||
-rw-r--r-- | readme.txt | 7 | ||||
-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 |
11 files changed, 13 insertions, 154 deletions
diff --git a/demos/Win32-MinGW/chcore.h b/demos/Win32-MinGW/chcore.h index 2c916f536..9c7f9e8c1 100644 --- a/demos/Win32-MinGW/chcore.h +++ b/demos/Win32-MinGW/chcore.h @@ -77,17 +77,14 @@ typedef struct { #define INT_REQUIRED_STACK 0
#define STACK_ALIGN(n) ((((n) - 1) | sizeof(stkalign_t)) + 1)
-#define StackAlign(n) STACK_ALIGN(n)
#define THD_WA_SIZE(n) StackAlign(sizeof(Thread) + \
sizeof(void *) * 2 + \
sizeof(struct intctx) + \
(n) + \
INT_REQUIRED_STACK)
-#define UserStackSize(n) THD_WA_SIZE(n)
#define WORKING_AREA(s, n) stkalign_t s[THD_WA_SIZE(n) / sizeof(stkalign_t)];
-#define WorkingArea(s, n) WORKING_AREA(s, n)
/*
* Stack size for the system idle thread.
diff --git a/docs/reports/LPC2148-48-ARM.txt b/docs/reports/LPC2148-48-ARM.txt index 0b385422a..adf584c04 100644 --- a/docs/reports/LPC2148-48-ARM.txt +++ b/docs/reports/LPC2148-48-ARM.txt @@ -1,5 +1,5 @@ ***************************************************************************
-Kernel: ChibiOS/RT 0.8.2
+Kernel: ChibiOS/RT 1.0.0 RC1
Compiler: GCC 4.3.2 (YAGARTO 28.09.2008)
Options: -O2 -fomit-frame-pointer -mabi=apcs-gnu -falign-functions=16
Settings: CCLK=48, MAMCR=2, MAMTIM=3 (3 wait states)
@@ -40,7 +40,7 @@ Settings: CCLK=48, MAMCR=2, MAMTIM=3 (3 wait states) --- Result: SUCCESS
---------------------------------------------------------------------------
--- Test Case 12 (Heap, allocation and fragmentation test)
---- Size : 27788 bytes, not fragmented
+--- Size : 27792 bytes, not fragmented
--- Result: SUCCESS
---------------------------------------------------------------------------
--- Test Case 13 (Memory Pools, allocation and enqueuing test)
@@ -53,7 +53,7 @@ Settings: CCLK=48, MAMCR=2, MAMTIM=3 (3 wait states) --- Result: SUCCESS
---------------------------------------------------------------------------
--- Test Case 16 (Benchmark, context switch #1, optimal)
---- Score : 144451 msgs/S, 288902 ctxswc/S
+--- Score : 144452 msgs/S, 288904 ctxswc/S
--- Result: SUCCESS
---------------------------------------------------------------------------
--- Test Case 17 (Benchmark, context switch #2, empty ready list)
@@ -61,15 +61,15 @@ Settings: CCLK=48, MAMCR=2, MAMTIM=3 (3 wait states) --- Result: SUCCESS
---------------------------------------------------------------------------
--- Test Case 18 (Benchmark, context switch #3, 4 threads in ready list)
---- Score : 111978 msgs/S, 223956 ctxswc/S
+--- Score : 111980 msgs/S, 223960 ctxswc/S
--- Result: SUCCESS
---------------------------------------------------------------------------
--- Test Case 19 (Benchmark, threads creation/termination, worst case)
---- Score : 92663 threads/S
+--- Score : 99406 threads/S
--- Result: SUCCESS
---------------------------------------------------------------------------
--- Test Case 20 (Benchmark, threads creation/termination, optimal)
---- Score : 122600 threads/S
+--- Score : 134686 threads/S
--- Result: SUCCESS
---------------------------------------------------------------------------
--- Test Case 21 (Benchmark, mass reschedulation, 5 threads)
@@ -81,7 +81,7 @@ Settings: CCLK=48, MAMCR=2, MAMTIM=3 (3 wait states) --- Result: SUCCESS
---------------------------------------------------------------------------
--- Test Case 23 (Benchmark, virtual timers set/reset)
---- Score : 309496 timers/S
+--- Score : 309498 timers/S
--- Result: SUCCESS
---------------------------------------------------------------------------
diff --git a/ports/ARM7/chcore.h b/ports/ARM7/chcore.h index 470b9de26..1c90eff99 100644 --- a/ports/ARM7/chcore.h +++ b/ports/ARM7/chcore.h @@ -126,17 +126,14 @@ extern "C" { #endif /* !THUMB */
#define STACK_ALIGN(n) ((((n) - 1) | sizeof(stkalign_t)) + 1)
-#define StackAlign(n) STACK_ALIGN(n)
#define THD_WA_SIZE(n) STACK_ALIGN(sizeof(Thread) + \
sizeof(struct intctx) + \
sizeof(struct extctx) + \
(n) + \
INT_REQUIRED_STACK)
-#define UserStackSize(n) THD_WA_SIZE(n)
#define WORKING_AREA(s, n) stkalign_t s[THD_WA_SIZE(n) / sizeof(stkalign_t)];
-#define WorkingArea(s, n) WORKING_AREA(s, n)
#ifdef THUMB
#define chSysSwitchI chSysSwitchI_thumb
diff --git a/ports/ARMCM3/chcore.h b/ports/ARMCM3/chcore.h index c11b948eb..30679e495 100644 --- a/ports/ARMCM3/chcore.h +++ b/ports/ARMCM3/chcore.h @@ -124,20 +124,18 @@ typedef struct { * Enforces a 32 bit alignment for a stack area size value. */ #define STACK_ALIGN(n) ((((n) - 1) | sizeof(stkalign_t)) + 1) -#define StackAlign(n) STACK_ALIGN(n) #define THD_WA_SIZE(n) STACK_ALIGN(sizeof(Thread) + \ sizeof(struct intctx) + \ sizeof(struct extctx) + \ (n) + \ INT_REQUIRED_STACK) -#define UserStackSize(n) THD_WA_SIZE(n) #define WORKING_AREA(s, n) stkalign_t s[THD_WA_SIZE(n) / sizeof(stkalign_t)]; -#define WorkingArea(s, n) WORKING_AREA(s, n) /* called on each interrupt entry, currently nothing is done */ #define chSysIRQEnterI() + /* called on each interrupt exit, pends a supervisor handler for * execution after all higher priority interrupts; PendSVVector() */ #define chSysIRQExitI() { \ diff --git a/ports/AVR/chcore.h b/ports/AVR/chcore.h index 421c9028f..210b4c366 100644 --- a/ports/AVR/chcore.h +++ b/ports/AVR/chcore.h @@ -107,17 +107,14 @@ typedef struct { #define INT_REQUIRED_STACK 8
#define STACK_ALIGN(n) ((((n) - 1) | sizeof(stkalign_t)) + 1)
-#define StackAlign(n) STACK_ALIGN(n)
#define THD_WA_SIZE(n) STACK_ALIGN(sizeof(Thread) + \
(sizeof(struct intctx) - 1) + \
(sizeof(struct extctx) - 1) + \
(n) + \
INT_REQUIRED_STACK)
-#define UserStackSize(n) THD_WA_SIZE(n)
#define WORKING_AREA(s, n) stkalign_t s[THD_WA_SIZE(n) / sizeof(stkalign_t)];
-#define WorkingArea(s, n) WORKING_AREA(s, n)
#define chSysLock() asm volatile ("cli")
diff --git a/ports/MSP430/chcore.h b/ports/MSP430/chcore.h index 5246b2621..996f88912 100644 --- a/ports/MSP430/chcore.h +++ b/ports/MSP430/chcore.h @@ -84,17 +84,14 @@ typedef struct { #define INT_REQUIRED_STACK 32
#define STACK_ALIGN(n) ((((n) - 1) | sizeof(stkalign_t)) + 1)
-#define StackAlign(n) STACK_ALIGN(n)
#define THD_WA_SIZE(n) STACK_ALIGN(sizeof(Thread) + \
sizeof(struct intctx) + \
sizeof(struct extctx) + \
(n) + \
INT_REQUIRED_STACK)
-#define UserStackSize(n) THD_WA_SIZE(n)
#define WORKING_AREA(s, n) stkalign_t s[THD_WA_SIZE(n) / sizeof(stkalign_t)];
-#define WorkingArea(s, n) WORKING_AREA(s, n)
#define chSysLock() asm volatile ("dint")
#define chSysUnlock() asm volatile ("eint")
diff --git a/readme.txt b/readme.txt index d3b5cf58d..32146ffd0 100644 --- a/readme.txt +++ b/readme.txt @@ -76,10 +76,13 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process, *** 1.0.0 RC1 ***
- FIX: Disabled the configuration option CH_USE_MESSAGES_PRIORITY from the
MSP430 demo, the default for this option should be off.
-- Removed deprecated APIs: chThdCreate() and chThdCreateFast(), removed some
- references to those APIs from the test suite.
+- Removed deprecated threads APIs: chThdCreate() and chThdCreateFast(), removed
+ some references to those APIs from the test suite.
+- Removed deprecated events APIs: chEvtWait(), chEvtWaitTimeout(), chEvtSend(),
+ chEvtSendI(), EventMask().
- Removed deprecated configuration feature CH_USE_EXIT_EVENT and the related
API chThdGetExitEventSource().
+- Removed deprecated macros: WorkingArea(), UserStackSize(), StackAlign().
- Added usage note into the readme of the MinGW demo.
*** 0.8.3 ***
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)];
|