aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
Diffstat (limited to 'os')
-rw-r--r--os/hal/src/mac.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/os/hal/src/mac.c b/os/hal/src/mac.c
index 553613438..e052e0945 100644
--- a/os/hal/src/mac.c
+++ b/os/hal/src/mac.c
@@ -148,6 +148,7 @@ msg_t macWaitTransmitDescriptor(MACDriver *macp,
MACTransmitDescriptor *tdp,
systime_t time) {
msg_t msg;
+ systime_t now;
chDbgCheck((macp != NULL) && (tdp != NULL), "macWaitTransmitDescriptor");
chDbgAssert(macp->state == MAC_ACTIVE, "macWaitTransmitDescriptor(), #1",
@@ -156,7 +157,7 @@ msg_t macWaitTransmitDescriptor(MACDriver *macp,
while (((msg = mac_lld_get_transmit_descriptor(macp, tdp)) != RDY_OK) &&
(time > 0)) {
chSysLock();
- systime_t now = chTimeNow();
+ now = chTimeNow();
if ((msg = chSemWaitTimeoutS(&macp->tdsem, time)) == RDY_TIMEOUT) {
chSysUnlock();
break;
@@ -206,6 +207,7 @@ msg_t macWaitReceiveDescriptor(MACDriver *macp,
MACReceiveDescriptor *rdp,
systime_t time) {
msg_t msg;
+ systime_t now;
chDbgCheck((macp != NULL) && (rdp != NULL), "macWaitReceiveDescriptor");
chDbgAssert(macp->state == MAC_ACTIVE, "macWaitReceiveDescriptor(), #1",
@@ -214,7 +216,7 @@ msg_t macWaitReceiveDescriptor(MACDriver *macp,
while (((msg = mac_lld_get_receive_descriptor(macp, rdp)) != RDY_OK) &&
(time > 0)) {
chSysLock();
- systime_t now = chTimeNow();
+ now = chTimeNow();
if ((msg = chSemWaitTimeoutS(&macp->rdsem, time)) == RDY_TIMEOUT) {
chSysUnlock();
break;