diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-11-02 10:22:36 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-11-02 10:22:36 +0000 |
commit | a5454ca785c3f5862453ea0521fd919fcd32ce41 (patch) | |
tree | 2dc4e03ebd9f22dd642416f86d8e3769d55b94bb /os/hal/src | |
parent | bfb9a08f46f526cb8725a504a9c56cd2d229ce88 (diff) | |
download | ChibiOS-a5454ca785c3f5862453ea0521fd919fcd32ce41.tar.gz ChibiOS-a5454ca785c3f5862453ea0521fd919fcd32ce41.tar.bz2 ChibiOS-a5454ca785c3f5862453ea0521fd919fcd32ce41.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7458 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/src')
-rw-r--r-- | os/hal/src/mac.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/os/hal/src/mac.c b/os/hal/src/mac.c index 66f10131f..82446267d 100644 --- a/os/hal/src/mac.c +++ b/os/hal/src/mac.c @@ -81,10 +81,10 @@ void macObjectInit(MACDriver *macp) { macp->state = MAC_STOP;
macp->config = NULL;
- chSemObjectInit(&macp->tdsem, 0);
- chSemObjectInit(&macp->rdsem, 0);
+ osalThreadQueueObjectInit(&macp->tdqueue);
+ osalThreadQueueObjectInit(&macp->rdqueue);
#if MAC_USE_EVENTS
- chEvtObjectInit(&macp->rdevent);
+ osalEventObjectInit(&macp->rdevent);
#endif
}
@@ -160,7 +160,8 @@ msg_t macWaitTransmitDescriptor(MACDriver *macp, (time > 0)) {
osalSysLock();
now = osalOsGetSystemTimeX();
- if ((msg = chSemWaitTimeoutS(&macp->tdsem, time)) == MSG_TIMEOUT) {
+ msg = osalThreadEnqueueTimeoutS(&macp->tdqueue, time);
+ if (msg == MSG_TIMEOUT) {
osalSysUnlock();
break;
}
@@ -218,7 +219,8 @@ msg_t macWaitReceiveDescriptor(MACDriver *macp, (time > 0)) {
osalSysLock();
now = osalOsGetSystemTimeX();
- if ((msg = chSemWaitTimeoutS(&macp->rdsem, time)) == MSG_TIMEOUT) {
+ msg = osalThreadEnqueueTimeoutS(&macp->rdqueue, time);
+ if (msg == MSG_TIMEOUT) {
osalSysUnlock();
break;
}
|