Fixed bug 3113443.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/stable_2.0.x@2393 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
gdisirio 2010-11-20 10:49:42 +00:00
parent a7ccf97f43
commit e15738df0b
4 changed files with 24 additions and 9 deletions

View File

@ -31,7 +31,7 @@ PROJECT_NAME = ChibiOS/RT
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = 2.0.6
PROJECT_NUMBER = 2.0.7
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.

View File

@ -46,7 +46,7 @@
/**
* @brief Kernel version string.
*/
#define CH_KERNEL_VERSION "2.0.6"
#define CH_KERNEL_VERSION "2.0.7"
/**
* @brief Kernel version major number.
@ -61,7 +61,7 @@
/**
* @brief Kernel version patch number.
*/
#define CH_KERNEL_PATCH 6
#define CH_KERNEL_PATCH 7
/*
* Common values.

View File

@ -349,11 +349,15 @@ eventmask_t chEvtWaitOneTimeout(eventmask_t mask, systime_t time) {
chSysLock();
if ((m = (ctp->p_epending & mask)) == 0) {
if (TIME_IMMEDIATE == time)
if (TIME_IMMEDIATE == time) {
chSysUnlock();
return (eventmask_t)0;
}
ctp->p_u.ewmask = mask;
if (chSchGoSleepTimeoutS(THD_STATE_WTOREVT, time) < RDY_OK)
if (chSchGoSleepTimeoutS(THD_STATE_WTOREVT, time) < RDY_OK) {
chSysUnlock();
return (eventmask_t)0;
}
m = ctp->p_epending & mask;
}
m &= -m;
@ -386,11 +390,15 @@ eventmask_t chEvtWaitAnyTimeout(eventmask_t mask, systime_t time) {
chSysLock();
if ((m = (ctp->p_epending & mask)) == 0) {
if (TIME_IMMEDIATE == time)
if (TIME_IMMEDIATE == time) {
chSysUnlock();
return (eventmask_t)0;
}
ctp->p_u.ewmask = mask;
if (chSchGoSleepTimeoutS(THD_STATE_WTOREVT, time) < RDY_OK)
if (chSchGoSleepTimeoutS(THD_STATE_WTOREVT, time) < RDY_OK) {
chSysUnlock();
return (eventmask_t)0;
}
m = ctp->p_epending & mask;
}
ctp->p_epending &= ~m;
@ -419,11 +427,15 @@ eventmask_t chEvtWaitAllTimeout(eventmask_t mask, systime_t time) {
chSysLock();
if ((ctp->p_epending & mask) != mask) {
if (TIME_IMMEDIATE == time)
if (TIME_IMMEDIATE == time) {
chSysUnlock();
return (eventmask_t)0;
}
ctp->p_u.ewmask = mask;
if (chSchGoSleepTimeoutS(THD_STATE_WTANDEVT, time) < RDY_OK)
if (chSchGoSleepTimeoutS(THD_STATE_WTANDEVT, time) < RDY_OK) {
chSysUnlock();
return (eventmask_t)0;
}
}
ctp->p_epending &= ~mask;

View File

@ -58,6 +58,9 @@
*** Releases ***
*****************************************************************************
*** 2.0.7 ***
- FIX: Fixed defective event wait functions with timeout (bug 3113443).
*** 2.0.6 ***
- FIX: Fixed typo in memstreams.h (bug 3089567).
- FIX: Fixed wrong macro check in LPC214x and AT91SAM7 serial drivers (bug