From 48cf30f8ab478008fe2ff6ea855f94b04968ba9e Mon Sep 17 00:00:00 2001 From: gdisirio Date: Thu, 1 Oct 2009 18:24:27 +0000 Subject: [PATCH] git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1198 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/io/mac.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/os/io/mac.c b/os/io/mac.c index 809ea5fd1..01541682e 100644 --- a/os/io/mac.c +++ b/os/io/mac.c @@ -27,11 +27,6 @@ #include #include -/** - * @brief Transmit descriptors counter semaphore. - */ -static Semaphore tdsem, rdsem; - /** * @brief MAC Driver initialization. */ @@ -96,7 +91,7 @@ msg_t macWaitTransmitDescriptor(MACDriver *macp, (time > 0)) { chSysLock(); systime_t now = chTimeNow(); - if ((msg = chSemWaitTimeoutS(&tdsem, time)) == RDY_TIMEOUT) + if ((msg = chSemWaitTimeoutS(&macp->md_tdsem, time)) == RDY_TIMEOUT) break; if (time != TIME_INFINITE) time -= (chTimeNow() - now); @@ -142,7 +137,7 @@ msg_t macWaitReceiveDescriptor(MACDriver *macp, (time > 0)) { chSysLock(); systime_t now = chTimeNow(); - if ((msg = chSemWaitTimeoutS(&rdsem, time)) == RDY_TIMEOUT) + if ((msg = chSemWaitTimeoutS(&macp->md_rdsem, time)) == RDY_TIMEOUT) break; if (time != TIME_INFINITE) time -= (chTimeNow() - now);