diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-10-01 18:24:27 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-10-01 18:24:27 +0000 |
commit | 48cf30f8ab478008fe2ff6ea855f94b04968ba9e (patch) | |
tree | 0b209ff54dc4418f48a09022b97b7e883c78a930 /os | |
parent | a1892b59a906042a42ef580b11736cc186994baa (diff) | |
download | ChibiOS-48cf30f8ab478008fe2ff6ea855f94b04968ba9e.tar.gz ChibiOS-48cf30f8ab478008fe2ff6ea855f94b04968ba9e.tar.bz2 ChibiOS-48cf30f8ab478008fe2ff6ea855f94b04968ba9e.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1198 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r-- | os/io/mac.c | 9 |
1 files 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 @@ -28,11 +28,6 @@ #include <mac.h>
/**
- * @brief Transmit descriptors counter semaphore. - */
-static Semaphore tdsem, rdsem;
-
-/**
* @brief MAC Driver initialization. */
void macInit(void) {
@@ -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);
|