aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-08-26 13:07:19 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-08-26 13:07:19 +0000
commitc8dff54685e5e904f7e7c6382144ac22035aad10 (patch)
tree06787ca72a0b8f3cf6acd1ab8c60450ba0251a8a
parent611c3138873b38fd26c19c43ce3436fe0528604a (diff)
downloadChibiOS-c8dff54685e5e904f7e7c6382144ac22035aad10.tar.gz
ChibiOS-c8dff54685e5e904f7e7c6382144ac22035aad10.tar.bz2
ChibiOS-c8dff54685e5e904f7e7c6382144ac22035aad10.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6226 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--os/hal/osal/chibios/osal.h8
-rw-r--r--os/hal/platforms/STM32/USBv1/usb_lld.c4
-rw-r--r--os/rt/include/chsys.h4
-rw-r--r--os/rt/src/chsys.c8
4 files changed, 13 insertions, 11 deletions
diff --git a/os/hal/osal/chibios/osal.h b/os/hal/osal/chibios/osal.h
index 55141960b..b03681f09 100644
--- a/os/hal/osal/chibios/osal.h
+++ b/os/hal/osal/chibios/osal.h
@@ -408,9 +408,9 @@ static inline void osalSysUnlockFromISR(void) {
*
* @xclass
*/
-static inline syssts_t osalSysGetAndLockX(void) {
+static inline syssts_t osalSysGetStatusAndLockX(void) {
- return chSysGetAndLockX();
+ return chSysGetStatusAndLockX();
}
/**
@@ -420,9 +420,9 @@ static inline syssts_t osalSysGetAndLockX(void) {
*
* @xclass
*/
-static inline void osalSysRestoreLockX(syssts_t sts) {
+static inline void osalSysRestoreLockAndRescheduleX(syssts_t sts) {
- chSysRestoreLockX(sts);
+ chSysRestoreLockAndRescheduleX(sts);
}
/**
diff --git a/os/hal/platforms/STM32/USBv1/usb_lld.c b/os/hal/platforms/STM32/USBv1/usb_lld.c
index 6f1dbc099..b1e721556 100644
--- a/os/hal/platforms/STM32/USBv1/usb_lld.c
+++ b/os/hal/platforms/STM32/USBv1/usb_lld.c
@@ -248,12 +248,12 @@ static void usb_packet_write_from_queue(stm32_usb_descriptor_t *udp,
}
/* Updating queue.*/
- sts = osalSysGetAndLockX();
+ sts = osalSysGetStatusAndLockX();
oqp->q_counter += n;
osalQueueWakeupAllI(&oqp->q_waiting, Q_OK);
- osalSysRestoreLockX(sts);
+ osalSysRestoreLockAndRescheduleX(sts);
}
/*===========================================================================*/
diff --git a/os/rt/include/chsys.h b/os/rt/include/chsys.h
index 678770299..270772323 100644
--- a/os/rt/include/chsys.h
+++ b/os/rt/include/chsys.h
@@ -218,8 +218,8 @@ extern "C" {
void chSysInit(void);
void chSysHalt(const char *reason);
void chSysTimerHandlerI(void);
- syssts_t chSysGetAndLockX(void);
- void chSysRestoreLockX(syssts_t sts);
+ syssts_t chSysGetStatusAndLockX(void);
+ void chSysRestoreLockAndRescheduleX(syssts_t sts);
#if CH_PORT_SUPPORTS_RT
bool chSysIsCounterWithinX(rtcnt_t cnt, rtcnt_t start, rtcnt_t end);
void chSysPolledDelayX(rtcnt_t cycles);
diff --git a/os/rt/src/chsys.c b/os/rt/src/chsys.c
index 5279ef518..19964ec13 100644
--- a/os/rt/src/chsys.c
+++ b/os/rt/src/chsys.c
@@ -227,7 +227,7 @@ void chSysTimerHandlerI(void) {
*
* @xclass
*/
-syssts_t chSysGetAndLockX(void) {
+syssts_t chSysGetStatusAndLockX(void) {
syssts_t sts = port_get_irq_status();
if (port_irq_enabled(sts)) {
@@ -246,13 +246,15 @@ syssts_t chSysGetAndLockX(void) {
*
* @xclass
*/
-void chSysRestoreLockX(syssts_t sts) {
+void chSysRestoreLockAndRescheduleX(syssts_t sts) {
if (port_irq_enabled(sts)) {
if (port_is_isr_context())
chSysUnlockFromISR();
- else
+ else {
+ chSchRescheduleS();
chSysUnlock();
+ }
}
}