diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-11-14 11:01:51 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-11-14 11:01:51 +0000 |
commit | 1b6619e5ccd8ee5a28968c5e703b334ce3738d7a (patch) | |
tree | 7304c7a7fdfceab91d1982e108614bba5988f232 /os/hal | |
parent | ca00f534f71568901028a117860d2d8dd5bfa29f (diff) | |
download | ChibiOS-1b6619e5ccd8ee5a28968c5e703b334ce3738d7a.tar.gz ChibiOS-1b6619e5ccd8ee5a28968c5e703b334ce3738d7a.tar.bz2 ChibiOS-1b6619e5ccd8ee5a28968c5e703b334ce3738d7a.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6474 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal')
-rw-r--r-- | os/hal/ports/STM32/USBv1/usb_lld.c | 4 | ||||
-rw-r--r-- | os/hal/ports/STM32/can_lld.c | 6 | ||||
-rw-r--r-- | os/hal/src/can.c | 12 | ||||
-rw-r--r-- | os/hal/src/hal_queues.c | 20 |
4 files changed, 21 insertions, 21 deletions
diff --git a/os/hal/ports/STM32/USBv1/usb_lld.c b/os/hal/ports/STM32/USBv1/usb_lld.c index 1a44a678f..a8159a898 100644 --- a/os/hal/ports/STM32/USBv1/usb_lld.c +++ b/os/hal/ports/STM32/USBv1/usb_lld.c @@ -178,7 +178,7 @@ static void usb_packet_read_to_queue(stm32_usb_descriptor_t *udp, osalSysLockFromISR();
iqp->q_counter += n;
- osalQueueWakeupAllI(&iqp->q_waiting, Q_OK);
+ osalThreadDequeueAllI(&iqp->q_waiting, Q_OK);
osalSysUnlockFromISR();
}
@@ -251,7 +251,7 @@ static void usb_packet_write_from_queue(stm32_usb_descriptor_t *udp, sts = osalSysGetStatusAndLockX();
oqp->q_counter += n;
- osalQueueWakeupAllI(&oqp->q_waiting, Q_OK);
+ osalThreadDequeueAllI(&oqp->q_waiting, Q_OK);
osalSysRestoreStatusX(sts);
}
diff --git a/os/hal/ports/STM32/can_lld.c b/os/hal/ports/STM32/can_lld.c index 266f87504..5b021ccc8 100644 --- a/os/hal/ports/STM32/can_lld.c +++ b/os/hal/ports/STM32/can_lld.c @@ -130,7 +130,7 @@ static void can_lld_tx_handler(CANDriver *canp) { /* No more events until a message is transmitted.*/
canp->can->TSR = CAN_TSR_RQCP0 | CAN_TSR_RQCP1 | CAN_TSR_RQCP2;
osalSysLockFromISR();
- osalQueueWakeupAllI(&canp->txqueue, MSG_OK);
+ osalThreadDequeueAllI(&canp->txqueue, MSG_OK);
osalEventBroadcastFlagsI(&canp->txempty_event, CAN_MAILBOX_TO_MASK(1));
osalSysUnlockFromISR();
}
@@ -150,7 +150,7 @@ static void can_lld_rx0_handler(CANDriver *canp) { /* No more receive events until the queue 0 has been emptied.*/
canp->can->IER &= ~CAN_IER_FMPIE0;
osalSysLockFromISR();
- osalQueueWakeupAllI(&canp->rxqueue, MSG_OK);
+ osalThreadDequeueAllI(&canp->rxqueue, MSG_OK);
osalEventBroadcastFlagsI(&canp->rxfull_event, CAN_MAILBOX_TO_MASK(1));
osalSysUnlockFromISR();
}
@@ -178,7 +178,7 @@ static void can_lld_rx1_handler(CANDriver *canp) { /* No more receive events until the queue 0 has been emptied.*/
canp->can->IER &= ~CAN_IER_FMPIE1;
osalSysLockFromISR();
- osalQueueWakeupAllI(&canp->rxqueue, MSG_OK);
+ osalThreadDequeueAllI(&canp->rxqueue, MSG_OK);
osalEventBroadcastFlagsI(&canp->rxfull_event, CAN_MAILBOX_TO_MASK(2));
osalSysUnlockFromISR();
}
diff --git a/os/hal/src/can.c b/os/hal/src/can.c index ed5c43f87..92efdf7e7 100644 --- a/os/hal/src/can.c +++ b/os/hal/src/can.c @@ -73,8 +73,8 @@ void canObjectInit(CANDriver *canp) { canp->state = CAN_STOP;
canp->config = NULL;
- osalQueueObjectInit(&canp->txqueue);
- osalQueueObjectInit(&canp->rxqueue);
+ osalThreadQueueObjectInit(&canp->txqueue);
+ osalThreadQueueObjectInit(&canp->rxqueue);
osalEventObjectInit(&canp->rxfull_event);
osalEventObjectInit(&canp->txempty_event);
osalEventObjectInit(&canp->error_event);
@@ -131,8 +131,8 @@ void canStop(CANDriver *canp) { "invalid state");
can_lld_stop(canp);
canp->state = CAN_STOP;
- osalQueueWakeupAllI(&canp->rxqueue, MSG_RESET);
- osalQueueWakeupAllI(&canp->txqueue, MSG_RESET);
+ osalThreadDequeueAllI(&canp->rxqueue, MSG_RESET);
+ osalThreadDequeueAllI(&canp->txqueue, MSG_RESET);
osalOsRescheduleS();
osalSysUnlock();
}
@@ -170,7 +170,7 @@ msg_t canTransmit(CANDriver *canp, osalDbgAssert((canp->state == CAN_READY) || (canp->state == CAN_SLEEP),
"invalid state");
while ((canp->state == CAN_SLEEP) || !can_lld_is_tx_empty(canp, mailbox)) {
- msg_t msg = osalQueueGoSleepTimeoutS(&canp->txqueue, timeout);
+ msg_t msg = osalThreadEnqueueTimeoutS(&canp->txqueue, timeout);
if (msg != MSG_OK) {
osalSysUnlock();
return msg;
@@ -215,7 +215,7 @@ msg_t canReceive(CANDriver *canp, osalDbgAssert((canp->state == CAN_READY) || (canp->state == CAN_SLEEP),
"invalid state");
while ((canp->state == CAN_SLEEP) || !can_lld_is_rx_nonempty(canp, mailbox)) {
- msg_t msg = osalQueueGoSleepTimeoutS(&canp->rxqueue, timeout);
+ msg_t msg = osalThreadEnqueueTimeoutS(&canp->rxqueue, timeout);
if (msg != MSG_OK) {
osalSysUnlock();
return msg;
diff --git a/os/hal/src/hal_queues.c b/os/hal/src/hal_queues.c index 52b9daf6c..dac58a155 100644 --- a/os/hal/src/hal_queues.c +++ b/os/hal/src/hal_queues.c @@ -62,7 +62,7 @@ void iqObjectInit(input_queue_t *iqp, uint8_t *bp, size_t size,
qnotify_t infy, void *link) {
- osalQueueObjectInit(&iqp->q_waiting);
+ osalThreadQueueObjectInit(&iqp->q_waiting);
iqp->q_counter = 0;
iqp->q_buffer = iqp->q_rdptr = iqp->q_wrptr = bp;
iqp->q_top = bp + size;
@@ -87,7 +87,7 @@ void iqResetI(input_queue_t *iqp) { iqp->q_rdptr = iqp->q_wrptr = iqp->q_buffer;
iqp->q_counter = 0;
- osalQueueWakeupAllI(&iqp->q_waiting, Q_RESET);
+ osalThreadDequeueAllI(&iqp->q_waiting, Q_RESET);
}
/**
@@ -115,7 +115,7 @@ msg_t iqPutI(input_queue_t *iqp, uint8_t b) { if (iqp->q_wrptr >= iqp->q_top)
iqp->q_wrptr = iqp->q_buffer;
- osalQueueWakeupOneI(&iqp->q_waiting, Q_OK);
+ osalThreadDequeueNextI(&iqp->q_waiting, Q_OK);
return Q_OK;
}
@@ -149,7 +149,7 @@ msg_t iqGetTimeout(input_queue_t *iqp, systime_t time) { while (iqIsEmptyI(iqp)) {
msg_t msg;
- if ((msg = osalQueueGoSleepTimeoutS(&iqp->q_waiting, time)) < Q_OK) {
+ if ((msg = osalThreadEnqueueTimeoutS(&iqp->q_waiting, time)) < Q_OK) {
osalSysUnlock();
return msg;
}
@@ -201,7 +201,7 @@ size_t iqReadTimeout(input_queue_t *iqp, uint8_t *bp, nfy(iqp);
while (iqIsEmptyI(iqp)) {
- if (osalQueueGoSleepTimeoutS(&iqp->q_waiting, time) != Q_OK) {
+ if (osalThreadEnqueueTimeoutS(&iqp->q_waiting, time) != Q_OK) {
osalSysUnlock();
return r;
}
@@ -240,7 +240,7 @@ size_t iqReadTimeout(input_queue_t *iqp, uint8_t *bp, void oqObjectInit(output_queue_t *oqp, uint8_t *bp, size_t size,
qnotify_t onfy, void *link) {
- osalQueueObjectInit(&oqp->q_waiting);
+ osalThreadQueueObjectInit(&oqp->q_waiting);
oqp->q_counter = size;
oqp->q_buffer = oqp->q_rdptr = oqp->q_wrptr = bp;
oqp->q_top = bp + size;
@@ -265,7 +265,7 @@ void oqResetI(output_queue_t *oqp) { oqp->q_rdptr = oqp->q_wrptr = oqp->q_buffer;
oqp->q_counter = qSizeI(oqp);
- osalQueueWakeupAllI(&oqp->q_waiting, Q_RESET);
+ osalThreadDequeueAllI(&oqp->q_waiting, Q_RESET);
}
/**
@@ -296,7 +296,7 @@ msg_t oqPutTimeout(output_queue_t *oqp, uint8_t b, systime_t time) { while (oqIsFullI(oqp)) {
msg_t msg;
- if ((msg = osalQueueGoSleepTimeoutS(&oqp->q_waiting, time)) < Q_OK) {
+ if ((msg = osalThreadEnqueueTimeoutS(&oqp->q_waiting, time)) < Q_OK) {
osalSysUnlock();
return msg;
}
@@ -337,7 +337,7 @@ msg_t oqGetI(output_queue_t *oqp) { if (oqp->q_rdptr >= oqp->q_top)
oqp->q_rdptr = oqp->q_buffer;
- osalQueueWakeupOneI(&oqp->q_waiting, Q_OK);
+ osalThreadDequeueNextI(&oqp->q_waiting, Q_OK);
return b;
}
@@ -376,7 +376,7 @@ size_t oqWriteTimeout(output_queue_t *oqp, const uint8_t *bp, osalSysLock();
while (TRUE) {
while (oqIsFullI(oqp)) {
- if (osalQueueGoSleepTimeoutS(&oqp->q_waiting, time) != Q_OK) {
+ if (osalThreadEnqueueTimeoutS(&oqp->q_waiting, time) != Q_OK) {
osalSysUnlock();
return w;
}
|