diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-02-13 15:52:40 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-02-13 15:52:40 +0000 |
commit | f67eb2c108183bc6f037c0cabb95dbd5995207ca (patch) | |
tree | 6afd21dbd090a67d60e25680adca1474a4226441 /os | |
parent | eb3355b5589b499e0d36e23f282bf8544cde0bbf (diff) | |
download | ChibiOS-f67eb2c108183bc6f037c0cabb95dbd5995207ca.tar.gz ChibiOS-f67eb2c108183bc6f037c0cabb95dbd5995207ca.tar.bz2 ChibiOS-f67eb2c108183bc6f037c0cabb95dbd5995207ca.zip |
Fixed bug 3179783.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2735 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r-- | os/hal/src/mac.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/os/hal/src/mac.c b/os/hal/src/mac.c index 48656a8a3..9d033fe33 100644 --- a/os/hal/src/mac.c +++ b/os/hal/src/mac.c @@ -123,8 +123,10 @@ msg_t macWaitTransmitDescriptor(MACDriver *macp, (time > 0)) {
chSysLock();
systime_t now = chTimeNow();
- if ((msg = chSemWaitTimeoutS(&macp->md_tdsem, time)) == RDY_TIMEOUT)
+ if ((msg = chSemWaitTimeoutS(&macp->md_tdsem, time)) == RDY_TIMEOUT) {
+ chSysUnlock();
break;
+ }
if (time != TIME_INFINITE)
time -= (chTimeNow() - now);
chSysUnlock();
@@ -173,8 +175,10 @@ msg_t macWaitReceiveDescriptor(MACDriver *macp, (time > 0)) {
chSysLock();
systime_t now = chTimeNow();
- if ((msg = chSemWaitTimeoutS(&macp->md_rdsem, time)) == RDY_TIMEOUT)
+ if ((msg = chSemWaitTimeoutS(&macp->md_rdsem, time)) == RDY_TIMEOUT) {
+ chSysUnlock();
break;
+ }
if (time != TIME_INFINITE)
time -= (chTimeNow() - now);
chSysUnlock();
|