git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6228 35acf78f-673a-0410-8e92-d51de3d6d3f4
parent
b1f3465325
commit
56a9ba32e8
|
@ -397,11 +397,12 @@ static inline void osalSysUnlockFromISR(void) {
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Returns the execution context and enters the kernel lock mode.
|
||||
* @brief Returns the execution status and enters a critical zone.
|
||||
* @details This functions enters into a critical zone and can be called
|
||||
* from any context. Because its flexibility it is less efficient
|
||||
* than @p chSysLock() which is preferable when the calling context
|
||||
* is known.
|
||||
* @post The system is in a critical zone.
|
||||
*
|
||||
* @return The previous system status, the encoding of this
|
||||
* status word is architecture-dependent and opaque.
|
||||
|
@ -414,15 +415,17 @@ static inline syssts_t osalSysGetStatusAndLockX(void) {
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Restores the specified execution status.
|
||||
* @brief Restores the specified execution status and leaves a critical zone.
|
||||
* @note A call to @p chSchRescheduleS() is automatically performed
|
||||
* if exiting the critical zone and if not in ISR context.
|
||||
*
|
||||
* @param[in] sts the system status to be restored.
|
||||
*
|
||||
* @xclass
|
||||
*/
|
||||
static inline void osalSysRestoreLockAndRescheduleX(syssts_t sts) {
|
||||
static inline void osalSysRestoreStatusX(syssts_t sts) {
|
||||
|
||||
chSysRestoreLockAndRescheduleX(sts);
|
||||
chSysRestoreStatusX(sts);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -253,7 +253,7 @@ static void usb_packet_write_from_queue(stm32_usb_descriptor_t *udp,
|
|||
oqp->q_counter += n;
|
||||
osalQueueWakeupAllI(&oqp->q_waiting, Q_OK);
|
||||
|
||||
osalSysRestoreLockAndRescheduleX(sts);
|
||||
osalSysRestoreStatusX(sts);
|
||||
}
|
||||
|
||||
/*===========================================================================*/
|
||||
|
|
|
@ -219,7 +219,7 @@ extern "C" {
|
|||
void chSysHalt(const char *reason);
|
||||
void chSysTimerHandlerI(void);
|
||||
syssts_t chSysGetStatusAndLockX(void);
|
||||
void chSysRestoreLockAndRescheduleX(syssts_t sts);
|
||||
void chSysRestoreStatusX(syssts_t sts);
|
||||
#if CH_PORT_SUPPORTS_RT
|
||||
bool chSysIsCounterWithinX(rtcnt_t cnt, rtcnt_t start, rtcnt_t end);
|
||||
void chSysPolledDelayX(rtcnt_t cycles);
|
||||
|
|
|
@ -216,7 +216,7 @@ void chSysTimerHandlerI(void) {
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Returns the execution context and enters the kernel lock mode.
|
||||
* @brief Returns the execution status and enters a critical zone.
|
||||
* @details This functions enters into a critical zone and can be called
|
||||
* from any context. Because its flexibility it is less efficient
|
||||
* than @p chSysLock() which is preferable when the calling context
|
||||
|
@ -241,15 +241,15 @@ syssts_t chSysGetStatusAndLockX(void) {
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Restores the specified execution status.
|
||||
* @brief Restores the specified execution status and leaves a critical zone.
|
||||
* @note A call to @p chSchRescheduleS() is automatically performed
|
||||
* is exiting the critical zone and if in proper context.
|
||||
* if exiting the critical zone and if not in ISR context.
|
||||
*
|
||||
* @param[in] sts the system status to be restored.
|
||||
*
|
||||
* @xclass
|
||||
*/
|
||||
void chSysRestoreLockAndRescheduleX(syssts_t sts) {
|
||||
void chSysRestoreStatusX(syssts_t sts) {
|
||||
|
||||
if (port_irq_enabled(sts)) {
|
||||
if (port_is_isr_context())
|
||||
|
|
Loading…
Reference in New Issue