TIME_IMMEDIATE and TIME_INFINITE values swapped.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2757 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
17f0815d52
commit
b3b1028036
|
@ -130,7 +130,7 @@ Settings: SYSCLK=72, ACR=0x12 (2 wait states)
|
|||
--- Result: SUCCESS
|
||||
----------------------------------------------------------------------------
|
||||
--- Test Case 11.9 (Benchmark, I/O Queues throughput)
|
||||
--- Score : 465772 bytes/S
|
||||
--- Score : 474232 bytes/S
|
||||
--- Result: SUCCESS
|
||||
----------------------------------------------------------------------------
|
||||
--- Test Case 11.10 (Benchmark, virtual timers set/reset)
|
||||
|
|
|
@ -38,67 +38,67 @@ Platform : ARM Cortex-M3
|
|||
OS Setup : Full kernel
|
||||
Compiler : arm-none-eabi-gcc (GCC) 4.5.2
|
||||
Options : -O2 -mthumb -DCH_OPTIMIZE_SPEED=TRUE
|
||||
Kernel Size = 6180
|
||||
Kernel Size = 6172
|
||||
|
||||
Platform : ARM Cortex-M3
|
||||
OS Setup : Full kernel
|
||||
Compiler : arm-none-eabi-gcc (GCC) 4.5.2
|
||||
Options : -O2 -mthumb -DCH_OPTIMIZE_SPEED=FALSE
|
||||
Kernel Size = 5680
|
||||
Kernel Size = 5672
|
||||
|
||||
Platform : ARM Cortex-M3
|
||||
OS Setup : Minimal kernel
|
||||
Compiler : arm-none-eabi-gcc (GCC) 4.5.2
|
||||
Options : -O2 -mthumb
|
||||
Kernel Size = 1428
|
||||
Kernel Size = 1432
|
||||
|
||||
Platform : ARM Cortex-M3
|
||||
OS Setup : Full kernel
|
||||
Compiler : arm-none-eabi-gcc (GCC) 4.5.2
|
||||
Options : -Os -mthumb -DCH_OPTIMIZE_SPEED=TRUE
|
||||
Kernel Size = 5576
|
||||
Kernel Size = 5568
|
||||
|
||||
Platform : ARM Cortex-M3
|
||||
OS Setup : Full kernel
|
||||
Compiler : arm-none-eabi-gcc (GCC) 4.5.2
|
||||
Options : -Os -mthumb -DCH_OPTIMIZE_SPEED=FALSE
|
||||
Kernel Size = 5168
|
||||
Kernel Size = 5156
|
||||
|
||||
Platform : ARM Cortex-M3
|
||||
OS Setup : Minimal kernel
|
||||
Compiler : arm-none-eabi-gcc (GCC) 4.5.2
|
||||
Options : -Os -mthumb
|
||||
Kernel Size = 1244
|
||||
Kernel Size = 1248
|
||||
|
||||
Platform : ARM Cortex-M3
|
||||
OS Setup : Full kernel
|
||||
Compiler : arm-none-eabi-gcc (GCC) 4.5.2
|
||||
Options : -Os -mthumb -ffixed-r7 -DCH_CURRP_REGISTER_CACHE=\"r7\" -DCH_OPTIMIZE_SPEED=TRUE
|
||||
Kernel Size = 5356
|
||||
Kernel Size = 5348
|
||||
|
||||
Platform : ARM Cortex-M3
|
||||
OS Setup : Full kernel
|
||||
Compiler : arm-none-eabi-gcc (GCC) 4.5.2
|
||||
Options : -Os -mthumb -ffixed-r7 -DCH_CURRP_REGISTER_CACHE=\"r7\" -DCH_OPTIMIZE_SPEED=FALSE
|
||||
Kernel Size = 4976
|
||||
Kernel Size = 4964
|
||||
|
||||
Platform : ARM Cortex-M3
|
||||
OS Setup : Minimal kernel
|
||||
Compiler : arm-none-eabi-gcc (GCC) 4.5.2
|
||||
Options : -Os -mthumb -ffixed-r7 -DCH_CURRP_REGISTER_CACHE=\"r7\"
|
||||
Kernel Size = 1196
|
||||
Kernel Size = 1200
|
||||
|
||||
Platform : ARM Cortex-M0
|
||||
OS Setup : Full kernel
|
||||
Compiler : arm-none-eabi-gcc (GCC) 4.5.2
|
||||
Options : -O2 -mthumb -DCH_OPTIMIZE_SPEED=TRUE
|
||||
Kernel Size = 5428
|
||||
Kernel Size = 5432
|
||||
|
||||
Platform : ARM Cortex-M0
|
||||
OS Setup : Full kernel
|
||||
Compiler : arm-none-eabi-gcc (GCC) 4.5.2
|
||||
Options : -O2 -mthumb -DCH_OPTIMIZE_SPEED=FALSE
|
||||
Kernel Size = 5232
|
||||
Kernel Size = 5236
|
||||
|
||||
Platform : ARM Cortex-M0
|
||||
OS Setup : Minimal kernel
|
||||
|
@ -146,13 +146,13 @@ Platform : ARM7TDMI (ARM mode)
|
|||
OS Setup : Full kernel
|
||||
Compiler : arm-none-eabi-gcc (GCC) 4.5.2
|
||||
Options : -Os -DCH_OPTIMIZE_SPEED=TRUE
|
||||
Kernel Size = 8340
|
||||
Kernel Size = 8344
|
||||
|
||||
Platform : ARM7TDMI (ARM mode)
|
||||
OS Setup : Full kernel
|
||||
Compiler : arm-none-eabi-gcc (GCC) 4.5.2
|
||||
Options : -Os -DCH_OPTIMIZE_SPEED=FALSE
|
||||
Kernel Size = 7984
|
||||
Kernel Size = 7988
|
||||
|
||||
Platform : ARM7TDMI (ARM mode)
|
||||
OS Setup : Minimal kernel
|
||||
|
@ -182,13 +182,13 @@ Platform : ARM7TDMI (ARM mode)
|
|||
OS Setup : Full kernel
|
||||
Compiler : arm-none-eabi-gcc (GCC) 4.5.2
|
||||
Options : -Os -ffixed-r7 -DCH_CURRP_REGISTER_CACHE=\"r7\" -DCH_OPTIMIZE_SPEED=TRUE
|
||||
Kernel Size = 8048
|
||||
Kernel Size = 8052
|
||||
|
||||
Platform : ARM7TDMI (ARM mode)
|
||||
OS Setup : Full kernel
|
||||
Compiler : arm-none-eabi-gcc (GCC) 4.5.2
|
||||
Options : -Os -ffixed-r7 -DCH_CURRP_REGISTER_CACHE=\"r7\" -DCH_OPTIMIZE_SPEED=FALSE
|
||||
Kernel Size = 7712
|
||||
Kernel Size = 7716
|
||||
|
||||
Platform : ARM7TDMI (ARM mode)
|
||||
OS Setup : Minimal kernel
|
||||
|
@ -200,13 +200,13 @@ Platform : ARM7TDMI (THUMB mode)
|
|||
OS Setup : Full kernel
|
||||
Compiler : arm-none-eabi-gcc (GCC) 4.5.2
|
||||
Options : -O2 -mthumb -DCH_OPTIMIZE_SPEED=TRUE -DTHUMB -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING
|
||||
Kernel Size = 6004
|
||||
Kernel Size = 6008
|
||||
|
||||
Platform : ARM7TDMI (THUMB mode)
|
||||
OS Setup : Full kernel
|
||||
Compiler : arm-none-eabi-gcc (GCC) 4.5.2
|
||||
Options : -O2 -mthumb -DCH_OPTIMIZE_SPEED=FALSE -DTHUMB -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING
|
||||
Kernel Size = 5796
|
||||
Kernel Size = 5800
|
||||
|
||||
Platform : ARM7TDMI (THUMB mode)
|
||||
OS Setup : Minimal kernel
|
||||
|
@ -236,7 +236,7 @@ Platform : ARM7TDMI (THUMB mode)
|
|||
OS Setup : Full kernel
|
||||
Compiler : arm-none-eabi-gcc (GCC) 4.5.2
|
||||
Options : -O2 -mthumb -ffixed-r7 -DCH_CURRP_REGISTER_CACHE=\"r7\" -DCH_OPTIMIZE_SPEED=TRUE -DTHUMB -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING
|
||||
Kernel Size = 5848
|
||||
Kernel Size = 5852
|
||||
|
||||
Platform : ARM7TDMI (THUMB mode)
|
||||
OS Setup : Full kernel
|
||||
|
@ -260,7 +260,7 @@ Platform : ARM7TDMI (THUMB mode)
|
|||
OS Setup : Full kernel
|
||||
Compiler : arm-none-eabi-gcc (GCC) 4.5.2
|
||||
Options : -Os -mthumb -ffixed-r7 -DCH_CURRP_REGISTER_CACHE=\"r7\" -DCH_OPTIMIZE_SPEED=FALSE -DTHUMB -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING
|
||||
Kernel Size = 5208
|
||||
Kernel Size = 5212
|
||||
|
||||
Platform : ARM7TDMI (THUMB mode)
|
||||
OS Setup : Minimal kernel
|
||||
|
|
|
@ -48,13 +48,13 @@
|
|||
* @note Not all functions accept @p TIME_IMMEDIATE as timeout parameter,
|
||||
* see the specific function documentation.
|
||||
*/
|
||||
#define TIME_IMMEDIATE ((systime_t)-1)
|
||||
#define TIME_IMMEDIATE ((systime_t)0)
|
||||
|
||||
/**
|
||||
* @brief Infinite time specification for all the syscalls with a timeout
|
||||
* specification.
|
||||
*/
|
||||
#define TIME_INFINITE ((systime_t)0)
|
||||
#define TIME_INFINITE ((systime_t)-1)
|
||||
|
||||
/**
|
||||
* @brief Returns the priority of the first thread on the given ready list.
|
||||
|
|
|
@ -292,9 +292,7 @@ extern "C" {
|
|||
* handled as follow:
|
||||
* - @a TIME_INFINITE the thread enters an infinite sleep
|
||||
* state.
|
||||
* - @a TIME_IMMEDIATE this value is accepted but
|
||||
* interpreted as a normal time specification not as
|
||||
* an immediate timeout specification.
|
||||
* - @a TIME_IMMEDIATE this value is not allowed.
|
||||
* .
|
||||
*
|
||||
* @sclass
|
||||
|
|
|
@ -203,11 +203,11 @@ msg_t chCondWaitS(CondVar *cp) {
|
|||
* mutex, the mutex ownership is lost.
|
||||
*
|
||||
* @param[in] cp pointer to the @p CondVar structure
|
||||
* @param[in] time the number of ticks before the operation timeouts,
|
||||
* the special value @p TIME_INFINITE is allowed.
|
||||
* It is not possible to specify zero @p TIME_IMMEDIATE
|
||||
* as timeout specification because it would make no sense
|
||||
* in this function.
|
||||
* @param[in] time the number of ticks before the operation timeouts, the
|
||||
* special values are handled as follow:
|
||||
* - @a TIME_INFINITE no timeout.
|
||||
* - @a TIME_IMMEDIATE this value is not allowed.
|
||||
* .
|
||||
* @return A message specifying how the invoking thread has been
|
||||
* released from the condition variable.
|
||||
* @retval RDY_OK if the condvar has been signaled using
|
||||
|
@ -240,11 +240,11 @@ msg_t chCondWaitTimeout(CondVar *cp, systime_t time) {
|
|||
* mutex, the mutex ownership is lost.
|
||||
*
|
||||
* @param[in] cp pointer to the @p CondVar structure
|
||||
* @param[in] time the number of ticks before the operation timeouts,
|
||||
* the special value @p TIME_INFINITE is allowed.
|
||||
* It is not possible to specify zero @p TIME_IMMEDIATE
|
||||
* as timeout specification because it would make no sense
|
||||
* in this function.
|
||||
* @param[in] time the number of ticks before the operation timeouts, the
|
||||
* special values are handled as follow:
|
||||
* - @a TIME_INFINITE no timeout.
|
||||
* - @a TIME_IMMEDIATE this value is not allowed.
|
||||
* .
|
||||
* @return A message specifying how the invoking thread has been
|
||||
* released from the condition variable.
|
||||
* @retval RDY_OK if the condvar has been signaled using
|
||||
|
@ -260,7 +260,7 @@ msg_t chCondWaitTimeoutS(CondVar *cp, systime_t time) {
|
|||
Mutex *mp;
|
||||
msg_t msg;
|
||||
|
||||
chDbgCheck(cp != NULL, "chCondWaitTimeoutS");
|
||||
chDbgCheck((cp != NULL) && (time != TIME_IMMEDIATE), "chCondWaitTimeoutS");
|
||||
chDbgAssert(currp->p_mtxlist != NULL,
|
||||
"chCondWaitTimeoutS(), #1",
|
||||
"not owning a mutex");
|
||||
|
|
|
@ -160,9 +160,7 @@ static void wakeup(void *p) {
|
|||
* - @a TIME_INFINITE the thread enters an infinite sleep
|
||||
* state, this is equivalent to invoking
|
||||
* @p chSchGoSleepS() but, of course, less efficient.
|
||||
* - @a TIME_IMMEDIATE this value is accepted but
|
||||
* interpreted as a normal time specification not as an
|
||||
* immediate timeout specification.
|
||||
* - @a TIME_IMMEDIATE this value is not allowed.
|
||||
* .
|
||||
* @return The wakeup message.
|
||||
* @retval RDY_TIMEOUT if a timeout occurs.
|
||||
|
|
|
@ -273,16 +273,14 @@ void chThdTerminate(Thread *tp) {
|
|||
* handled as follow:
|
||||
* - @a TIME_INFINITE the thread enters an infinite sleep
|
||||
* state.
|
||||
* - @a TIME_IMMEDIATE this value is accepted but
|
||||
* interpreted as a normal time specification not as an
|
||||
* immediate timeout specification.
|
||||
* - @a TIME_IMMEDIATE this value is not allowed.
|
||||
* .
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
void chThdSleep(systime_t time) {
|
||||
|
||||
chDbgCheck(time != TIME_INFINITE, "chThdSleep");
|
||||
chDbgCheck(time != TIME_IMMEDIATE, "chThdSleep");
|
||||
|
||||
chSysLock();
|
||||
chThdSleepS(time);
|
||||
|
|
|
@ -52,10 +52,12 @@ void vt_init(void) {
|
|||
* the I-Locked state, see @ref system_states.
|
||||
*
|
||||
* @param[out] vtp the @p VirtualTimer structure pointer
|
||||
* @param[in] time the number of time ticks, the value @p TIME_INFINITE
|
||||
* is notallowed. The value @p TIME_IMMEDIATE is allowed
|
||||
* but interpreted as a normal time specification not as
|
||||
* an immediate timeout specification.
|
||||
* @param[in] time the number of ticks before the operation timeouts, the
|
||||
* special values are handled as follow:
|
||||
* - @a TIME_INFINITE is allowed but interpreted as a
|
||||
* normal time specification.
|
||||
* - @a TIME_IMMEDIATE this value is not allowed.
|
||||
* .
|
||||
* @param[in] vtfunc the timer callback function. After invoking the
|
||||
* callback the timer is disabled and the structure can
|
||||
* be disposed or reused.
|
||||
|
@ -67,7 +69,7 @@ void vt_init(void) {
|
|||
void chVTSetI(VirtualTimer *vtp, systime_t time, vtfunc_t vtfunc, void *par) {
|
||||
VirtualTimer *p;
|
||||
|
||||
chDbgCheck((vtp != NULL) && (vtfunc != NULL) && (time != TIME_INFINITE),
|
||||
chDbgCheck((vtp != NULL) && (vtfunc != NULL) && (time != TIME_IMMEDIATE),
|
||||
"chVTSetI");
|
||||
|
||||
vtp->vt_par = par;
|
||||
|
|
|
@ -94,6 +94,8 @@
|
|||
driver. This event marks the physical transmission end of a data stream.
|
||||
- NEW: Implemented the new IO_TRANSMISSION_END event in the STM32 serial
|
||||
driver.
|
||||
- CHANGE: Swapped the numeric values of the TIME_IMMEDIATE and TIME_INFINITE
|
||||
constants. Fixed the relative documentation in various places.
|
||||
|
||||
*** 2.1.8 ***
|
||||
- FIX: Fixed error in STM32 ADC driver macro names (bug 3160306)(backported
|
||||
|
|
Loading…
Reference in New Issue