Correct the naming of some new functions.
Serval private functions were added with a name ending with _uninterruptible. That is not correct. These new functions should be named _noncancelable.
This commit is contained in:
parent
6a43282197
commit
e19246fe94
@ -238,7 +238,7 @@ static inline void am335x_i2c_modifyreg(FAR struct am335x_i2c_priv_s *priv,
|
||||
uint32_t setbits);
|
||||
static inline int am335x_i2c_sem_wait(FAR struct am335x_i2c_priv_s *priv);
|
||||
static int
|
||||
am335x_i2c_sem_wait_uninterruptible(FAR struct am335x_i2c_priv_s *priv);
|
||||
am335x_i2c_sem_wait_noncancelable(FAR struct am335x_i2c_priv_s *priv);
|
||||
|
||||
#ifdef CONFIG_AM335X_I2C_DYNTIMEO
|
||||
static useconds_t am335x_i2c_tousecs(int msgc, FAR struct i2c_msg_s *msgs);
|
||||
@ -471,7 +471,7 @@ static inline int am335x_i2c_sem_wait(FAR struct am335x_i2c_priv_s *priv)
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: am335x_i2c_sem_wait_uninterruptible
|
||||
* Name: am335x_i2c_sem_wait_noncancelable
|
||||
*
|
||||
* Description:
|
||||
* Take the exclusive access, waiting as necessary.
|
||||
@ -479,7 +479,7 @@ static inline int am335x_i2c_sem_wait(FAR struct am335x_i2c_priv_s *priv)
|
||||
****************************************************************************/
|
||||
|
||||
static int
|
||||
am335x_i2c_sem_wait_uninterruptible(FAR struct am335x_i2c_priv_s *priv)
|
||||
am335x_i2c_sem_wait_noncancelable(FAR struct am335x_i2c_priv_s *priv)
|
||||
{
|
||||
return nxsem_wait_uninterruptible(&priv->sem_excl);
|
||||
}
|
||||
@ -1574,7 +1574,7 @@ static int am335x_i2c_reset(FAR struct i2c_master_s *dev)
|
||||
|
||||
/* Lock out other clients */
|
||||
|
||||
ret = am335x_i2c_sem_wait_uninterruptible(priv);
|
||||
ret = am335x_i2c_sem_wait_noncancelable(priv);
|
||||
if (ret < 0)
|
||||
{
|
||||
return ret;
|
||||
|
@ -281,7 +281,7 @@ static inline void efm32_i2c_modifyreg(FAR struct efm32_i2c_priv_s *priv,
|
||||
uint32_t setbits);
|
||||
static inline int efm32_i2c_sem_wait(FAR struct efm32_i2c_priv_s *priv);
|
||||
static int
|
||||
efm32_i2c_sem_wait_uninterruptible(FAR struct efm32_i2c_priv_s *priv);
|
||||
efm32_i2c_sem_wait_noncancelable(FAR struct efm32_i2c_priv_s *priv);
|
||||
|
||||
#ifdef CONFIG_EFM32_I2C_DYNTIMEOUT
|
||||
static useconds_t efm32_i2c_tousecs(int msgc, FAR struct i2c_msg_s *msgs);
|
||||
@ -493,7 +493,7 @@ static inline int efm32_i2c_sem_wait(FAR struct efm32_i2c_priv_s *priv)
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: efm32_i2c_sem_wait_uninterruptible
|
||||
* Name: efm32_i2c_sem_wait_noncancelable
|
||||
*
|
||||
* Description:
|
||||
* Take the exclusive access, waiting as necessary
|
||||
@ -501,7 +501,7 @@ static inline int efm32_i2c_sem_wait(FAR struct efm32_i2c_priv_s *priv)
|
||||
****************************************************************************/
|
||||
|
||||
static int
|
||||
efm32_i2c_sem_wait_uninterruptible(FAR struct efm32_i2c_priv_s *priv)
|
||||
efm32_i2c_sem_wait_noncancelable(FAR struct efm32_i2c_priv_s *priv)
|
||||
{
|
||||
return nxsem_wait_uninterruptible(&priv->sem_excl);
|
||||
}
|
||||
@ -1625,7 +1625,7 @@ int efm32_i2c_reset(FAR struct i2c_master_s *dev)
|
||||
|
||||
/* Lock out other clients */
|
||||
|
||||
ret = efm32_i2c_sem_wait_uninterruptible(priv);
|
||||
ret = efm32_i2c_sem_wait_noncancelable(priv);
|
||||
if (ret < 0)
|
||||
{
|
||||
return ret;
|
||||
|
@ -240,7 +240,7 @@ static inline void imxrt_lpi2c_modifyreg(FAR struct imxrt_lpi2c_priv_s *priv,
|
||||
uint32_t setbits);
|
||||
static inline int imxrt_lpi2c_sem_wait(FAR struct imxrt_lpi2c_priv_s *priv);
|
||||
static int
|
||||
imxrt_lpi2c_sem_wait_uninterruptible(FAR struct imxrt_lpi2c_priv_s *priv);
|
||||
imxrt_lpi2c_sem_wait_noncancelable(FAR struct imxrt_lpi2c_priv_s *priv);
|
||||
|
||||
#ifdef CONFIG_IMXRT_LPI2C_DYNTIMEO
|
||||
static useconds_t imxrt_lpi2c_tousecs(int msgc, FAR struct i2c_msg_s *msgs);
|
||||
@ -536,7 +536,7 @@ static inline int imxrt_lpi2c_sem_wait(FAR struct imxrt_lpi2c_priv_s *priv)
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: imxrt_lpi2c_sem_wait_uninterruptible
|
||||
* Name: imxrt_lpi2c_sem_wait_noncancelable
|
||||
*
|
||||
* Description:
|
||||
* Take the exclusive access, waiting as necessary.
|
||||
@ -544,7 +544,7 @@ static inline int imxrt_lpi2c_sem_wait(FAR struct imxrt_lpi2c_priv_s *priv)
|
||||
****************************************************************************/
|
||||
|
||||
static int
|
||||
imxrt_lpi2c_sem_wait_uninterruptible(FAR struct imxrt_lpi2c_priv_s *priv)
|
||||
imxrt_lpi2c_sem_wait_noncancelable(FAR struct imxrt_lpi2c_priv_s *priv)
|
||||
{
|
||||
return nxsem_wait_uninterruptible(&priv->sem_excl);
|
||||
}
|
||||
@ -1795,7 +1795,7 @@ static int imxrt_lpi2c_reset(FAR struct i2c_master_s *dev)
|
||||
|
||||
/* Lock out other clients */
|
||||
|
||||
ret = imxrt_lpi2c_sem_wait_uninterruptible(priv);
|
||||
ret = imxrt_lpi2c_sem_wait_noncancelable(priv);
|
||||
if (ret < 0)
|
||||
{
|
||||
return ret;
|
||||
|
@ -153,7 +153,7 @@ static inline void
|
||||
kinetis_i2c_sem_destroy(FAR struct kinetis_i2cdev_s *priv);
|
||||
static inline int kinetis_i2c_sem_wait(FAR struct kinetis_i2cdev_s *priv);
|
||||
static int
|
||||
kinetis_i2c_sem_wait_uninterruptible(FAR struct kinetis_i2cdev_s *priv);
|
||||
kinetis_i2c_sem_wait_noncancelable(FAR struct kinetis_i2cdev_s *priv);
|
||||
static inline void kinetis_i2c_sem_post(struct kinetis_i2cdev_s *priv);
|
||||
|
||||
/* Signal Helper */
|
||||
@ -364,7 +364,7 @@ static inline int kinetis_i2c_sem_wait(FAR struct kinetis_i2cdev_s *priv)
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: kinetis_i2c_sem_wait_uninterruptible
|
||||
* Name: kinetis_i2c_sem_wait_noncancelable
|
||||
*
|
||||
* Description:
|
||||
* Take the exclusive access, waiting as necessary
|
||||
@ -372,7 +372,7 @@ static inline int kinetis_i2c_sem_wait(FAR struct kinetis_i2cdev_s *priv)
|
||||
****************************************************************************/
|
||||
|
||||
static int
|
||||
kinetis_i2c_sem_wait_uninterruptible(FAR struct kinetis_i2cdev_s *priv)
|
||||
kinetis_i2c_sem_wait_noncancelable(FAR struct kinetis_i2cdev_s *priv)
|
||||
{
|
||||
return nxsem_wait_uninterruptible(&priv->mutex);
|
||||
}
|
||||
@ -1280,7 +1280,7 @@ static int kinetis_i2c_reset(struct i2c_master_s *dev)
|
||||
|
||||
/* Lock out other clients */
|
||||
|
||||
ret = kinetis_i2c_sem_wait_uninterruptible(priv);
|
||||
ret = kinetis_i2c_sem_wait_noncancelable(priv);
|
||||
if (ret < 0)
|
||||
{
|
||||
return ret;
|
||||
|
@ -289,7 +289,7 @@ static void lpc17_40_putreg(uint32_t val, uint32_t addr);
|
||||
/* Semaphores ***************************************************************/
|
||||
|
||||
static int lpc17_40_takesem(sem_t *sem);
|
||||
static int lpc17_40_takesem_uninterruptible(sem_t *sem);
|
||||
static int lpc17_40_takesem_noncancelable(sem_t *sem);
|
||||
#define lpc17_40_givesem(s) nxsem_post(s);
|
||||
|
||||
/* Byte stream access helper functions **************************************/
|
||||
@ -596,7 +596,7 @@ static int lpc17_40_takesem(sem_t *sem)
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lpc17_40_takesem_uninterruptible
|
||||
* Name: lpc17_40_takesem_noncancelable
|
||||
*
|
||||
* Description:
|
||||
* This is just a wrapper to handle the annoying behavior of semaphore
|
||||
@ -605,7 +605,7 @@ static int lpc17_40_takesem(sem_t *sem)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int lpc17_40_takesem_uninterruptible(sem_t *sem)
|
||||
static int lpc17_40_takesem_noncancelable(sem_t *sem)
|
||||
{
|
||||
int result;
|
||||
int ret = OK;
|
||||
@ -2587,7 +2587,7 @@ static int lpc17_40_free(struct usbhost_driver_s *drvr, uint8_t *buffer)
|
||||
|
||||
/* We must have exclusive access to the transfer buffer pool */
|
||||
|
||||
ret = lpc17_40_takesem_uninterruptible(&priv->exclsem);
|
||||
ret = lpc17_40_takesem_noncancelable(&priv->exclsem);
|
||||
lpc17_40_tbfree(buffer);
|
||||
lpc17_40_givesem(&priv->exclsem);
|
||||
return ret;
|
||||
|
@ -419,7 +419,7 @@ static int ehci_wait_usbsts(uint32_t maskbits, uint32_t donebits,
|
||||
/* Semaphores ***************************************************************/
|
||||
|
||||
static int lpc31_takesem(sem_t *sem);
|
||||
static int lpc31_takesem_uninterruptible(sem_t *sem);
|
||||
static int lpc31_takesem_noncancelable(sem_t *sem);
|
||||
#define lpc31_givesem(s) nxsem_post(s);
|
||||
|
||||
/* Allocators ***************************************************************/
|
||||
@ -1064,7 +1064,7 @@ static int lpc31_takesem(sem_t *sem)
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lpc31_takesem_uninterruptible
|
||||
* Name: lpc31_takesem_noncancelable
|
||||
*
|
||||
* Description:
|
||||
* This is just a wrapper to handle the annoying behavior of semaphore
|
||||
@ -1073,7 +1073,7 @@ static int lpc31_takesem(sem_t *sem)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int lpc31_takesem_uninterruptible(sem_t *sem)
|
||||
static int lpc31_takesem_noncancelable(sem_t *sem)
|
||||
{
|
||||
int result;
|
||||
int ret = OK;
|
||||
@ -2575,7 +2575,7 @@ static ssize_t lpc31_transfer_wait(struct lpc31_epinfo_s *epinfo)
|
||||
* this upon return.
|
||||
*/
|
||||
|
||||
ret2 = lpc31_takesem_uninterruptible(&g_ehci.exclsem);
|
||||
ret2 = lpc31_takesem_noncancelable(&g_ehci.exclsem);
|
||||
if (ret2 < 0)
|
||||
{
|
||||
ret = ret2;
|
||||
@ -2599,7 +2599,7 @@ static ssize_t lpc31_transfer_wait(struct lpc31_epinfo_s *epinfo)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Did lpc31_ioc_wait() or lpc31_takesem_uninterruptible() report an
|
||||
/* Did lpc31_ioc_wait() or lpc31_takesem_noncancelable() report an
|
||||
* error?
|
||||
*/
|
||||
|
||||
@ -3322,7 +3322,7 @@ static void lpc31_ehci_bottomhalf(FAR void *arg)
|
||||
* real option (other than to reschedule and delay).
|
||||
*/
|
||||
|
||||
lpc31_takesem_uninterruptible(&g_ehci.exclsem);
|
||||
lpc31_takesem_noncancelable(&g_ehci.exclsem);
|
||||
|
||||
/* Handle all unmasked interrupt sources */
|
||||
|
||||
|
@ -421,7 +421,7 @@ static int ehci_wait_usbsts(uint32_t maskbits, uint32_t donebits,
|
||||
/* Semaphores ***************************************************************/
|
||||
|
||||
static int lpc43_takesem(sem_t *sem);
|
||||
static int lpc43_takesem_uninterruptible(sem_t *sem);
|
||||
static int lpc43_takesem_noncancelable(sem_t *sem);
|
||||
#define lpc43_givesem(s) nxsem_post(s);
|
||||
|
||||
/* Allocators ***************************************************************/
|
||||
@ -1054,7 +1054,7 @@ static int lpc43_takesem(sem_t *sem)
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lpc43_takesem_uninterruptible
|
||||
* Name: lpc43_takesem_noncancelable
|
||||
*
|
||||
* Description:
|
||||
* This is just a wrapper to handle the annoying behavior of semaphore
|
||||
@ -1063,7 +1063,7 @@ static int lpc43_takesem(sem_t *sem)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int lpc43_takesem_uninterruptible(sem_t *sem)
|
||||
static int lpc43_takesem_noncancelable(sem_t *sem)
|
||||
{
|
||||
int result;
|
||||
int ret = OK;
|
||||
@ -2462,13 +2462,13 @@ static ssize_t lpc43_transfer_wait(struct lpc43_epinfo_s *epinfo)
|
||||
* this upon return.
|
||||
*/
|
||||
|
||||
ret2 = lpc43_takesem_uninterruptible(&g_ehci.exclsem);
|
||||
ret2 = lpc43_takesem_noncancelable(&g_ehci.exclsem);
|
||||
if (ret2 < 0)
|
||||
{
|
||||
ret = ret2;
|
||||
}
|
||||
|
||||
/* Did lpc43_ioc_wait() or lpc43_takesem_uninterruptible()report an
|
||||
/* Did lpc43_ioc_wait() or lpc43_takesem_noncancelable()report an
|
||||
* error?
|
||||
*/
|
||||
|
||||
@ -3160,7 +3160,7 @@ static void lpc43_ehci_bottomhalf(FAR void *arg)
|
||||
* real option (other than to reschedule and delay).
|
||||
*/
|
||||
|
||||
lpc43_takesem_uninterruptible(&g_ehci.exclsem);
|
||||
lpc43_takesem_noncancelable(&g_ehci.exclsem);
|
||||
|
||||
/* Handle all unmasked interrupt sources */
|
||||
|
||||
|
@ -370,7 +370,7 @@ static void lpc54_putreg(uint32_t val, uint32_t addr);
|
||||
/* Semaphores ***************************************************************/
|
||||
|
||||
static int lpc54_takesem(sem_t *sem);
|
||||
static int lpc54_takesem_uninterruptible(sem_t *sem);
|
||||
static int lpc54_takesem_noncancelable(sem_t *sem);
|
||||
#define lpc54_givesem(s) nxsem_post(s);
|
||||
|
||||
/* Byte stream access helper functions **************************************/
|
||||
@ -692,7 +692,7 @@ static int lpc54_takesem(sem_t *sem)
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lpc54_takesem_uninterruptible
|
||||
* Name: lpc54_takesem_noncancelable
|
||||
*
|
||||
* Description:
|
||||
* This is just a wrapper to handle the annoying behavior of semaphore
|
||||
@ -701,7 +701,7 @@ static int lpc54_takesem(sem_t *sem)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int lpc54_takesem_uninterruptible(sem_t *sem)
|
||||
static int lpc54_takesem_noncancelable(sem_t *sem)
|
||||
{
|
||||
int result;
|
||||
int ret = OK;
|
||||
@ -2672,7 +2672,7 @@ static int lpc54_free(struct usbhost_driver_s *drvr, uint8_t *buffer)
|
||||
|
||||
/* We must have exclusive access to the transfer buffer pool */
|
||||
|
||||
ret = lpc54_takesem_uninterruptible(&priv->exclsem);
|
||||
ret = lpc54_takesem_noncancelable(&priv->exclsem);
|
||||
lpc54_tbfree(buffer);
|
||||
lpc54_givesem(&priv->exclsem);
|
||||
return ret;
|
||||
|
@ -297,7 +297,7 @@ static int ehci_wait_usbsts(uint32_t maskbits, uint32_t donebits,
|
||||
/* Semaphores ***************************************************************/
|
||||
|
||||
static int sam_takesem(sem_t *sem);
|
||||
static int sam_takesem_uninterruptible(sem_t *sem);
|
||||
static int sam_takesem_noncancelable(sem_t *sem);
|
||||
#define sam_givesem(s) nxsem_post(s);
|
||||
|
||||
/* Allocators ***************************************************************/
|
||||
@ -810,7 +810,7 @@ static int sam_takesem(sem_t *sem)
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sam_takesem_uninterruptible
|
||||
* Name: sam_takesem_noncancelable
|
||||
*
|
||||
* Description:
|
||||
* This is just a wrapper to handle the annoying behavior of semaphore
|
||||
@ -819,7 +819,7 @@ static int sam_takesem(sem_t *sem)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int sam_takesem_uninterruptible(sem_t *sem)
|
||||
static int sam_takesem_noncancelable(sem_t *sem)
|
||||
{
|
||||
int result;
|
||||
int ret = OK;
|
||||
@ -2336,7 +2336,7 @@ static ssize_t sam_transfer_wait(struct sam_epinfo_s *epinfo)
|
||||
* this upon return.
|
||||
*/
|
||||
|
||||
ret2 = sam_takesem_uninterruptible(&g_ehci.exclsem);
|
||||
ret2 = sam_takesem_noncancelable(&g_ehci.exclsem);
|
||||
if (ret2 < 0)
|
||||
{
|
||||
ret = ret2;
|
||||
@ -2360,7 +2360,7 @@ static ssize_t sam_transfer_wait(struct sam_epinfo_s *epinfo)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Did sam_ioc_wait() or sam_takesem_uninterruptible() report an error? */
|
||||
/* Did sam_ioc_wait() or sam_takesem_noncancelable() report an error? */
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
@ -3070,7 +3070,7 @@ static void sam_ehci_bottomhalf(FAR void *arg)
|
||||
* real option (other than to reschedule and delay).
|
||||
*/
|
||||
|
||||
sam_takesem_uninterruptible(&g_ehci.exclsem);
|
||||
sam_takesem_noncancelable(&g_ehci.exclsem);
|
||||
|
||||
/* Handle all unmasked interrupt sources */
|
||||
|
||||
|
@ -344,7 +344,7 @@ static void sam_putreg(uint32_t val, uint32_t addr);
|
||||
/* Semaphores ***************************************************************/
|
||||
|
||||
static int sam_takesem(sem_t *sem);
|
||||
static int sam_takesem_uninterruptible(sem_t *sem);
|
||||
static int sam_takesem_noncancelable(sem_t *sem);
|
||||
#define sam_givesem(s) nxsem_post(s);
|
||||
|
||||
/* Byte stream access helper functions **************************************/
|
||||
@ -640,7 +640,7 @@ static int sam_takesem(sem_t *sem)
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sam_takesem_uninterruptible
|
||||
* Name: sam_takesem_noncancelable
|
||||
*
|
||||
* Description:
|
||||
* This is just a wrapper to handle the annoying behavior of semaphore
|
||||
@ -649,7 +649,7 @@ static int sam_takesem(sem_t *sem)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int sam_takesem_uninterruptible(sem_t *sem)
|
||||
static int sam_takesem_noncancelable(sem_t *sem)
|
||||
{
|
||||
int result;
|
||||
int ret = OK;
|
||||
@ -1929,7 +1929,7 @@ static int sam_ctrltd(struct sam_rhport_s *rhport,
|
||||
* this upon return.
|
||||
*/
|
||||
|
||||
ret2 = sam_takesem_uninterruptible(&g_ohci.exclsem);
|
||||
ret2 = sam_takesem_noncancelable(&g_ohci.exclsem);
|
||||
if (ret2 < 0)
|
||||
{
|
||||
ret = ret2;
|
||||
@ -2285,7 +2285,7 @@ static void sam_ohci_bottomhalf(void *arg)
|
||||
* real option (other than to reschedule and delay).
|
||||
*/
|
||||
|
||||
sam_takesem_uninterruptible(&g_ohci.exclsem);
|
||||
sam_takesem_noncancelable(&g_ohci.exclsem);
|
||||
|
||||
/* Root hub status change interrupt */
|
||||
|
||||
@ -2912,7 +2912,7 @@ static int sam_epfree(struct usbhost_driver_s *drvr, usbhost_ep_t ep)
|
||||
* periodic list and the interrupt table.
|
||||
*/
|
||||
|
||||
ret2 = sam_takesem_uninterruptible(&g_ohci.exclsem);
|
||||
ret2 = sam_takesem_noncancelable(&g_ohci.exclsem);
|
||||
|
||||
/* Remove the ED to the correct list depending on the transfer type */
|
||||
|
||||
@ -3045,7 +3045,7 @@ static int sam_free(struct usbhost_driver_s *drvr, uint8_t *buffer)
|
||||
|
||||
/* We must have exclusive access to the transfer buffer pool */
|
||||
|
||||
ret = sam_takesem_uninterruptible(&g_ohci.exclsem);
|
||||
ret = sam_takesem_noncancelable(&g_ohci.exclsem);
|
||||
sam_tbfree(buffer);
|
||||
sam_givesem(&g_ohci.exclsem);
|
||||
return ret;
|
||||
|
@ -202,7 +202,7 @@ static void i2c_putreg32(struct sam_i2c_dev_s *priv, uint32_t regval,
|
||||
unsigned int offset);
|
||||
|
||||
static int i2c_takesem(sem_t * sem);
|
||||
static int i2c_takesem_uninterruptible(sem_t * sem);
|
||||
static int i2c_takesem_noncancelable(sem_t * sem);
|
||||
#define i2c_givesem(sem) (nxsem_post(sem))
|
||||
|
||||
#ifdef CONFIG_SAM_I2C_REGDEBUG
|
||||
@ -468,7 +468,7 @@ static int i2c_takesem(sem_t *sem)
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Name: i2c_takesem_uninterruptible
|
||||
* Name: i2c_takesem_noncancelable
|
||||
*
|
||||
* Description:
|
||||
* Take the wait semaphore (handling false alarm wake-ups due to the receipt
|
||||
@ -482,7 +482,7 @@ static int i2c_takesem(sem_t *sem)
|
||||
*
|
||||
*******************************************************************************/
|
||||
|
||||
static int i2c_takesem_uninterruptible(sem_t *sem)
|
||||
static int i2c_takesem_noncancelable(sem_t *sem)
|
||||
{
|
||||
return nxsem_wait_uninterruptible(sem);
|
||||
}
|
||||
@ -1453,7 +1453,7 @@ int sam_i2c_reset(FAR struct i2c_master_s *dev)
|
||||
|
||||
/* Get exclusive access to the I2C device */
|
||||
|
||||
ret = i2c_takesem_uninterruptible(&priv->exclsem);
|
||||
ret = i2c_takesem_noncancelable(&priv->exclsem);
|
||||
if (ret < 0)
|
||||
{
|
||||
return ret;
|
||||
|
@ -190,7 +190,7 @@ static void i2c_putreg32(struct sam_i2c_dev_s *priv, uint32_t regval,
|
||||
unsigned int offset);
|
||||
|
||||
static int i2c_takesem(sem_t * sem);
|
||||
static int i2c_takesem_uninterruptible(sem_t * sem);
|
||||
static int i2c_takesem_noncancelable(sem_t * sem);
|
||||
#define i2c_givesem(sem) (nxsem_post(sem))
|
||||
|
||||
#ifdef CONFIG_SAM_I2C_REGDEBUG
|
||||
@ -493,7 +493,7 @@ static int i2c_takesem(sem_t *sem)
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Name: i2c_takesem_uninterruptible
|
||||
* Name: i2c_takesem_noncancelable
|
||||
*
|
||||
* Description:
|
||||
* Take the wait semaphore (handling false alarm wake-ups due to the receipt
|
||||
@ -507,7 +507,7 @@ static int i2c_takesem(sem_t *sem)
|
||||
*
|
||||
*******************************************************************************/
|
||||
|
||||
static int i2c_takesem_uninterruptible(sem_t *sem)
|
||||
static int i2c_takesem_noncancelable(sem_t *sem)
|
||||
{
|
||||
return nxsem_wait_uninterruptible(sem);
|
||||
}
|
||||
@ -1492,7 +1492,7 @@ int sam_i2c_reset(FAR struct i2c_master_s *dev)
|
||||
|
||||
/* Get exclusive access to the I2C device */
|
||||
|
||||
ret = i2c_takesem_uninterruptible(&priv->exclsem);
|
||||
ret = i2c_takesem_noncancelable(&priv->exclsem);
|
||||
if (ret < 0)
|
||||
{
|
||||
return ret;
|
||||
|
@ -128,7 +128,7 @@ static void spi_dumpregs(struct sam_spidev_s *priv, const char *msg);
|
||||
#endif
|
||||
|
||||
static int spi_semtake(struct sam_spidev_s *priv);
|
||||
static void spi_semtake_uninterruptible(struct sam_spidev_s *priv);
|
||||
static void spi_semtake_noncancelable(struct sam_spidev_s *priv);
|
||||
#define spi_semgive(priv) (nxsem_post(&(priv)->spisem))
|
||||
|
||||
/* Interrupt Handling */
|
||||
@ -351,7 +351,7 @@ static int spi_semtake(struct sam_spidev_s *priv)
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: spi_semtake_uninterruptible
|
||||
* Name: spi_semtake_noncancelable
|
||||
*
|
||||
* Description:
|
||||
* Take the semaphore that enforces mutually exclusive access to SPI
|
||||
@ -365,7 +365,7 @@ static int spi_semtake(struct sam_spidev_s *priv)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void spi_semtake_uninterruptible(struct sam_spidev_s *priv)
|
||||
static void spi_semtake_noncancelable(struct sam_spidev_s *priv)
|
||||
{
|
||||
int ret;
|
||||
|
||||
@ -881,7 +881,7 @@ static void spi_unbind(struct spi_sctrlr_s *sctrlr)
|
||||
|
||||
/* Get exclusive access to the SPI device */
|
||||
|
||||
spi_semtake_uninterruptible(priv);
|
||||
spi_semtake_noncancelable(priv);
|
||||
|
||||
/* Disable SPI interrupts (still enabled at the NVIC) */
|
||||
|
||||
@ -1069,7 +1069,7 @@ static void spi_qflush(struct spi_sctrlr_s *sctrlr)
|
||||
|
||||
/* Get exclusive access to the SPI device */
|
||||
|
||||
spi_semtake_uninterruptible(priv);
|
||||
spi_semtake_noncancelable(priv);
|
||||
|
||||
/* Mark the buffer empty, momentarily disabling interrupts */
|
||||
|
||||
|
@ -290,7 +290,7 @@ static inline void stm32_i2c_modifyreg(FAR struct stm32_i2c_priv_s *priv,
|
||||
uint8_t offset, uint16_t clearbits,
|
||||
uint16_t setbits);
|
||||
static inline int stm32_i2c_sem_wait(FAR struct stm32_i2c_priv_s *priv);
|
||||
static int stm32_i2c_sem_wait_uninterruptible(FAR struct stm32_i2c_priv_s *priv);
|
||||
static int stm32_i2c_sem_wait_noncancelable(FAR struct stm32_i2c_priv_s *priv);
|
||||
|
||||
#ifdef CONFIG_STM32_I2C_DYNTIMEO
|
||||
static useconds_t stm32_i2c_tousecs(int msgc, FAR struct i2c_msg_s *msgs);
|
||||
@ -520,14 +520,14 @@ static inline int stm32_i2c_sem_wait(FAR struct stm32_i2c_priv_s *priv)
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
* Name: stm32_i2c_sem_wait_uninterruptible
|
||||
* Name: stm32_i2c_sem_wait_noncancelable
|
||||
*
|
||||
* Description:
|
||||
* Take the exclusive access, waiting as necessary
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
static int stm32_i2c_sem_wait_uninterruptible(FAR struct stm32_i2c_priv_s *priv)
|
||||
static int stm32_i2c_sem_wait_noncancelable(FAR struct stm32_i2c_priv_s *priv)
|
||||
{
|
||||
return nxsem_wait_uninterruptible(&priv->sem_excl);
|
||||
}
|
||||
@ -1826,7 +1826,7 @@ static int stm32_i2c_reset(FAR struct i2c_master_s *dev)
|
||||
|
||||
/* Lock out other clients */
|
||||
|
||||
ret = stm32_i2c_sem_wait_uninterruptible(priv);
|
||||
ret = stm32_i2c_sem_wait_noncancelable(priv);
|
||||
if (ret < 0)
|
||||
{
|
||||
return ret;
|
||||
|
@ -320,7 +320,7 @@ static inline void stm32_i2c_modifyreg(FAR struct stm32_i2c_priv_s *priv,
|
||||
uint8_t offset, uint16_t clearbits,
|
||||
uint16_t setbits);
|
||||
static inline int stm32_i2c_sem_wait(FAR struct stm32_i2c_priv_s *priv);
|
||||
static int stm32_i2c_sem_wait_uninterruptible(FAR struct stm32_i2c_priv_s *priv);
|
||||
static int stm32_i2c_sem_wait_noncancelable(FAR struct stm32_i2c_priv_s *priv);
|
||||
|
||||
#ifdef CONFIG_STM32_I2C_DYNTIMEO
|
||||
static useconds_t stm32_i2c_tousecs(int msgc, FAR struct i2c_msg_s *msgs);
|
||||
@ -529,14 +529,14 @@ static inline int stm32_i2c_sem_wait(FAR struct stm32_i2c_priv_s *priv)
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
* Name: stm32_i2c_sem_wait_uninterruptible
|
||||
* Name: stm32_i2c_sem_wait_noncancelable
|
||||
*
|
||||
* Description:
|
||||
* Take the exclusive access, waiting as necessary
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
static int stm32_i2c_sem_wait_uninterruptible(FAR struct stm32_i2c_priv_s *priv)
|
||||
static int stm32_i2c_sem_wait_noncancelable(FAR struct stm32_i2c_priv_s *priv)
|
||||
{
|
||||
return nxsem_wait_uninterruptible(&priv->sem_excl);
|
||||
}
|
||||
@ -2292,7 +2292,7 @@ static int stm32_i2c_reset(FAR struct i2c_master_s * dev)
|
||||
|
||||
/* Lock out other clients */
|
||||
|
||||
ret = stm32_i2c_sem_wait_uninterruptible(priv);
|
||||
ret = stm32_i2c_sem_wait_noncancelable(priv);
|
||||
if (ret < 0)
|
||||
{
|
||||
return ret;
|
||||
|
@ -448,7 +448,7 @@ static inline void stm32_i2c_modifyreg32(FAR struct stm32_i2c_priv_s *priv,
|
||||
uint8_t offset, uint32_t clearbits,
|
||||
uint32_t setbits);
|
||||
static inline int stm32_i2c_sem_wait(FAR struct i2c_master_s *dev);
|
||||
static int stm32_i2c_sem_wait_uninterruptible(FAR struct i2c_master_s *dev);
|
||||
static int stm32_i2c_sem_wait_noncancelable(FAR struct i2c_master_s *dev);
|
||||
#ifdef CONFIG_STM32_I2C_DYNTIMEO
|
||||
static useconds_t stm32_i2c_tousecs(int msgc, FAR struct i2c_msg_s *msgs);
|
||||
#endif /* CONFIG_STM32_I2C_DYNTIMEO */
|
||||
@ -720,14 +720,14 @@ static inline int stm32_i2c_sem_wait(FAR struct i2c_master_s *dev)
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
* Name: stm32_i2c_sem_wait_uninterruptible
|
||||
* Name: stm32_i2c_sem_wait_noncancelable
|
||||
*
|
||||
* Description:
|
||||
* Take the exclusive access, waiting as necessary
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
static int stm32_i2c_sem_wait_uninterruptible(FAR struct i2c_master_s *dev)
|
||||
static int stm32_i2c_sem_wait_noncancelable(FAR struct i2c_master_s *dev)
|
||||
{
|
||||
return
|
||||
nxsem_wait_uninterruptible(&((struct stm32_i2c_inst_s *)dev)->priv->sem_excl);
|
||||
@ -2562,7 +2562,7 @@ static int stm32_i2c_reset(FAR struct i2c_master_s * dev)
|
||||
|
||||
/* Lock out other clients */
|
||||
|
||||
ret = stm32_i2c_sem_wait_uninterruptible(dev);
|
||||
ret = stm32_i2c_sem_wait_noncancelable(dev);
|
||||
if (ret < 0)
|
||||
{
|
||||
return ret;
|
||||
|
@ -297,7 +297,7 @@ static inline void stm32_modifyreg(uint32_t addr, uint32_t clrbits,
|
||||
/* Semaphores ***************************************************************/
|
||||
|
||||
static int stm32_takesem(sem_t *sem);
|
||||
static int stm32_takesem_uninterruptible(sem_t *sem);
|
||||
static int stm32_takesem_noncancelable(sem_t *sem);
|
||||
#define stm32_givesem(s) nxsem_post(s);
|
||||
|
||||
/* Byte stream access helper functions **************************************/
|
||||
@ -648,7 +648,7 @@ static int stm32_takesem(sem_t *sem)
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: stm32_takesem_uninterruptible
|
||||
* Name: stm32_takesem_noncancelable
|
||||
*
|
||||
* Description:
|
||||
* This is just a wrapper to handle the annoying behavior of semaphore
|
||||
@ -657,7 +657,7 @@ static int stm32_takesem(sem_t *sem)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int stm32_takesem_uninterruptible(sem_t *sem)
|
||||
static int stm32_takesem_noncancelable(sem_t *sem)
|
||||
{
|
||||
int result;
|
||||
int ret = OK;
|
||||
@ -4244,7 +4244,7 @@ static int stm32_epfree(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep)
|
||||
|
||||
/* We must have exclusive access to the USB host hardware and state structures */
|
||||
|
||||
ret = stm32_takesem_uninterruptible(&priv->exclsem);
|
||||
ret = stm32_takesem_noncancelable(&priv->exclsem);
|
||||
|
||||
/* A single channel is represent by an index in the range of 0 to
|
||||
* STM32_MAX_TX_FIFOS. Otherwise, the ep must be a pointer to an allocated
|
||||
|
@ -302,7 +302,7 @@ static inline void stm32_modifyreg(uint32_t addr, uint32_t clrbits,
|
||||
/* Semaphores ***************************************************************/
|
||||
|
||||
static int stm32_takesem(sem_t *sem);
|
||||
static int stm32_takesem_uninterruptible(sem_t *sem);
|
||||
static int stm32_takesem_noncancelable(sem_t *sem);
|
||||
#define stm32_givesem(s) nxsem_post(s);
|
||||
|
||||
/* Byte stream access helper functions **************************************/
|
||||
@ -653,7 +653,7 @@ static int stm32_takesem(sem_t *sem)
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: stm32_takesem_uninterruptible
|
||||
* Name: stm32_takesem_noncancelable
|
||||
*
|
||||
* Description:
|
||||
* This is just a wrapper to handle the annoying behavior of semaphore
|
||||
@ -662,7 +662,7 @@ static int stm32_takesem(sem_t *sem)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int stm32_takesem_uninterruptible(sem_t *sem)
|
||||
static int stm32_takesem_noncancelable(sem_t *sem)
|
||||
{
|
||||
int result;
|
||||
int ret = OK;
|
||||
@ -4244,7 +4244,7 @@ static int stm32_epfree(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep)
|
||||
|
||||
/* We must have exclusive access to the USB host hardware and state structures */
|
||||
|
||||
ret = stm32_takesem_uninterruptible(&priv->exclsem);
|
||||
ret = stm32_takesem_noncancelable(&priv->exclsem);
|
||||
|
||||
/* A single channel is represent by an index in the range of 0 to
|
||||
* STM32_MAX_TX_FIFOS. Otherwise, the ep must be a pointer to an allocated
|
||||
|
@ -315,7 +315,7 @@ static inline void stm32_i2c_modifyreg(FAR struct stm32_i2c_priv_s *priv,
|
||||
uint8_t offset, uint16_t clearbits,
|
||||
uint16_t setbits);
|
||||
static inline int stm32_i2c_sem_wait(FAR struct stm32_i2c_priv_s *priv);
|
||||
static int stm32_i2c_sem_wait_uninterruptible(FAR struct stm32_i2c_priv_s *priv);
|
||||
static int stm32_i2c_sem_wait_noncancelable(FAR struct stm32_i2c_priv_s *priv);
|
||||
|
||||
#ifdef CONFIG_STM32_I2C_DYNTIMEO
|
||||
static useconds_t stm32_i2c_tousecs(int msgc, FAR struct i2c_msg_s *msgs);
|
||||
@ -575,7 +575,7 @@ static inline int stm32_i2c_sem_wait(FAR struct stm32_i2c_priv_s *priv)
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
* Name: stm32_i2c_sem_wait_uninterruptible
|
||||
* Name: stm32_i2c_sem_wait_noncancelable
|
||||
*
|
||||
* Description:
|
||||
* Take the exclusive access, waiting as necessary. May be interrupted by a
|
||||
@ -583,7 +583,7 @@ static inline int stm32_i2c_sem_wait(FAR struct stm32_i2c_priv_s *priv)
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
static int stm32_i2c_sem_wait_uninterruptible(FAR struct stm32_i2c_priv_s *priv)
|
||||
static int stm32_i2c_sem_wait_noncancelable(FAR struct stm32_i2c_priv_s *priv)
|
||||
{
|
||||
return nxsem_wait_uninterruptible(&priv->sem_excl);
|
||||
}
|
||||
@ -2521,7 +2521,7 @@ static int stm32_i2c_reset(FAR struct i2c_master_s *dev)
|
||||
|
||||
/* Lock out other clients */
|
||||
|
||||
ret = stm32_i2c_sem_wait_uninterruptible(priv);
|
||||
ret = stm32_i2c_sem_wait_noncancelable(priv);
|
||||
if (ret < 0)
|
||||
{
|
||||
return ret;
|
||||
|
@ -486,7 +486,7 @@ static inline void stm32_i2c_modifyreg32(FAR struct stm32_i2c_priv_s *priv,
|
||||
uint8_t offset, uint32_t clearbits,
|
||||
uint32_t setbits);
|
||||
static inline int stm32_i2c_sem_wait(FAR struct i2c_master_s *dev);
|
||||
static int stm32_i2c_sem_wait_uninterruptible(FAR struct i2c_master_s *dev);
|
||||
static int stm32_i2c_sem_wait_noncancelable(FAR struct i2c_master_s *dev);
|
||||
#ifdef CONFIG_STM32F7_I2C_DYNTIMEO
|
||||
static useconds_t stm32_i2c_tousecs(int msgc, FAR struct i2c_msg_s *msgs);
|
||||
#endif /* CONFIG_STM32F7_I2C_DYNTIMEO */
|
||||
@ -758,7 +758,7 @@ static inline int stm32_i2c_sem_wait(FAR struct i2c_master_s *dev)
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
* Name: stm32_i2c_sem_wait_uninterruptible
|
||||
* Name: stm32_i2c_sem_wait_noncancelable
|
||||
*
|
||||
* Description:
|
||||
* Take the exclusive access, waiting as necessary. May be interrupted by a
|
||||
@ -766,7 +766,7 @@ static inline int stm32_i2c_sem_wait(FAR struct i2c_master_s *dev)
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
static int stm32_i2c_sem_wait_uninterruptible(FAR struct i2c_master_s *dev)
|
||||
static int stm32_i2c_sem_wait_noncancelable(FAR struct i2c_master_s *dev)
|
||||
{
|
||||
return
|
||||
nxsem_wait_uninterruptible(&((struct stm32_i2c_inst_s *)dev)->priv->sem_excl);
|
||||
@ -2601,7 +2601,7 @@ static int stm32_i2c_reset(FAR struct i2c_master_s * dev)
|
||||
|
||||
/* Lock out other clients */
|
||||
|
||||
ret = stm32_i2c_sem_wait_uninterruptible(dev);
|
||||
ret = stm32_i2c_sem_wait_noncancelable(dev);
|
||||
if (ret < 0)
|
||||
{
|
||||
return ret;
|
||||
|
@ -312,7 +312,7 @@ static inline void stm32_modifyreg(uint32_t addr, uint32_t clrbits,
|
||||
/* Semaphores ***************************************************************/
|
||||
|
||||
static int stm32_takesem(sem_t *sem);
|
||||
static int stm32_takesem_uninterruptible(sem_t *sem);
|
||||
static int stm32_takesem_noncancelable(sem_t *sem);
|
||||
#define stm32_givesem(s) nxsem_post(s);
|
||||
|
||||
/* Byte stream access helper functions **************************************/
|
||||
@ -659,7 +659,7 @@ static int stm32_takesem(sem_t *sem)
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: stm32_takesem_uninterruptible
|
||||
* Name: stm32_takesem_noncancelable
|
||||
*
|
||||
* Description:
|
||||
* This is just a wrapper to handle the annoying behavior of semaphore
|
||||
@ -668,7 +668,7 @@ static int stm32_takesem(sem_t *sem)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int stm32_takesem_uninterruptible(sem_t *sem)
|
||||
static int stm32_takesem_noncancelable(sem_t *sem)
|
||||
{
|
||||
int result;
|
||||
int ret = OK;
|
||||
@ -4234,7 +4234,7 @@ static int stm32_epfree(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep)
|
||||
|
||||
/* We must have exclusive access to the USB host hardware and state structures */
|
||||
|
||||
ret = stm32_takesem_uninterruptible(&priv->exclsem);
|
||||
ret = stm32_takesem_noncancelable(&priv->exclsem);
|
||||
|
||||
/* A single channel is represent by an index in the range of 0 to
|
||||
* STM32_MAX_TX_FIFOS. Otherwise, the ep must be a pointer to an allocated
|
||||
|
@ -439,7 +439,7 @@ static inline void stm32_i2c_modifyreg32(FAR struct stm32_i2c_priv_s *priv,
|
||||
uint8_t offset, uint32_t clearbits,
|
||||
uint32_t setbits);
|
||||
static inline int stm32_i2c_sem_wait(FAR struct i2c_master_s *dev);
|
||||
static int stm32_i2c_sem_wait_uninterruptible(FAR struct i2c_master_s *dev);
|
||||
static int stm32_i2c_sem_wait_noncancelable(FAR struct i2c_master_s *dev);
|
||||
#ifdef CONFIG_STM32H7_I2C_DYNTIMEO
|
||||
static useconds_t stm32_i2c_tousecs(int msgc, FAR struct i2c_msg_s *msgs);
|
||||
#endif /* CONFIG_STM32H7_I2C_DYNTIMEO */
|
||||
@ -711,7 +711,7 @@ static inline int stm32_i2c_sem_wait(FAR struct i2c_master_s *dev)
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
* Name: stm32_i2c_sem_wait_uninterruptible
|
||||
* Name: stm32_i2c_sem_wait_noncancelable
|
||||
*
|
||||
* Description:
|
||||
* Take the exclusive access, waiting as necessary. May be interrupted by a
|
||||
@ -719,7 +719,7 @@ static inline int stm32_i2c_sem_wait(FAR struct i2c_master_s *dev)
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
static int stm32_i2c_sem_wait_uninterruptible(FAR struct i2c_master_s *dev)
|
||||
static int stm32_i2c_sem_wait_noncancelable(FAR struct i2c_master_s *dev)
|
||||
{
|
||||
return
|
||||
nxsem_wait_uninterruptible(&((struct stm32_i2c_inst_s *)dev)->priv->sem_excl);
|
||||
@ -2546,7 +2546,7 @@ static int stm32_i2c_reset(FAR struct i2c_master_s * dev)
|
||||
|
||||
/* Lock out other clients */
|
||||
|
||||
ret = stm32_i2c_sem_wait_uninterruptible(dev);
|
||||
ret = stm32_i2c_sem_wait_noncancelable(dev);
|
||||
if (ret < 0)
|
||||
{
|
||||
return ret;
|
||||
|
@ -317,7 +317,7 @@ static inline void stm32_modifyreg(uint32_t addr, uint32_t clrbits,
|
||||
/* Semaphores ***************************************************************/
|
||||
|
||||
static int stm32_takesem(sem_t *sem);
|
||||
static int stm32_takesem_uninterruptible(sem_t *sem);
|
||||
static int stm32_takesem_noncancelable(sem_t *sem);
|
||||
#define stm32_givesem(s) nxsem_post(s);
|
||||
|
||||
/* Byte stream access helper functions **************************************/
|
||||
@ -664,7 +664,7 @@ static int stm32_takesem(sem_t *sem)
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: stm32_takesem_uninterruptible
|
||||
* Name: stm32_takesem_noncancelable
|
||||
*
|
||||
* Description:
|
||||
* This is just a wrapper to handle the annoying behavior of semaphore
|
||||
@ -673,7 +673,7 @@ static int stm32_takesem(sem_t *sem)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int stm32_takesem_uninterruptible(sem_t *sem)
|
||||
static int stm32_takesem_noncancelable(sem_t *sem)
|
||||
{
|
||||
int result;
|
||||
int ret = OK;
|
||||
@ -4240,7 +4240,7 @@ static int stm32_epfree(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep)
|
||||
|
||||
/* We must have exclusive access to the USB host hardware and state structures */
|
||||
|
||||
ret = stm32_takesem_uninterruptible(&priv->exclsem);
|
||||
ret = stm32_takesem_noncancelable(&priv->exclsem);
|
||||
|
||||
/* A single channel is represent by an index in the range of 0 to
|
||||
* STM32_MAX_TX_FIFOS. Otherwise, the ep must be a pointer to an allocated
|
||||
|
@ -479,7 +479,7 @@ static inline void stm32l4_i2c_modifyreg32(FAR struct stm32l4_i2c_priv_s *priv,
|
||||
uint8_t offset, uint32_t clearbits,
|
||||
uint32_t setbits);
|
||||
static inline int stm32l4_i2c_sem_wait(FAR struct i2c_master_s *dev);
|
||||
static int stm32l4_i2c_sem_wait_uninterruptible(FAR struct i2c_master_s *dev);
|
||||
static int stm32l4_i2c_sem_wait_noncancelable(FAR struct i2c_master_s *dev);
|
||||
#ifdef CONFIG_STM32L4_I2C_DYNTIMEO
|
||||
static useconds_t stm32l4_i2c_tousecs(int msgc, FAR struct i2c_msg_s *msgs);
|
||||
#endif /* CONFIG_STM32L4_I2C_DYNTIMEO */
|
||||
@ -752,14 +752,14 @@ static inline int stm32l4_i2c_sem_wait(FAR struct i2c_master_s *dev)
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
* Name: stm32l4_i2c_sem_wait_uninterruptible
|
||||
* Name: stm32l4_i2c_sem_wait_noncancelable
|
||||
*
|
||||
* Description:
|
||||
* Take the exclusive access, waiting as necessary
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
static int stm32l4_i2c_sem_wait_uninterruptible(FAR struct i2c_master_s *dev)
|
||||
static int stm32l4_i2c_sem_wait_noncancelable(FAR struct i2c_master_s *dev)
|
||||
{
|
||||
return
|
||||
nxsem_wait_uninterruptible(&((struct stm32l4_i2c_inst_s *)dev)->priv->sem_excl);
|
||||
@ -2727,7 +2727,7 @@ static int stm32l4_i2c_reset(FAR struct i2c_master_s * dev)
|
||||
|
||||
/* Lock out other clients */
|
||||
|
||||
ret = stm32l4_i2c_sem_wait_uninterruptible(dev);
|
||||
ret = stm32l4_i2c_sem_wait_noncancelable(dev);
|
||||
if (ret < 0)
|
||||
{
|
||||
return ret;
|
||||
|
@ -312,7 +312,7 @@ static inline void stm32l4_modifyreg(uint32_t addr, uint32_t clrbits,
|
||||
/* Semaphores ***************************************************************/
|
||||
|
||||
static int stm32l4_takesem(FAR sem_t *sem);
|
||||
static int stm32l4_takesem_uninterruptible(FAR sem_t *sem);
|
||||
static int stm32l4_takesem_noncancelable(FAR sem_t *sem);
|
||||
#define stm32l4_givesem(s) nxsem_post(s);
|
||||
|
||||
/* Byte stream access helper functions **************************************/
|
||||
@ -670,7 +670,7 @@ static int stm32l4_takesem(FAR sem_t *sem)
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: stm32l4_takesem_uninterruptible
|
||||
* Name: stm32l4_takesem_noncancelable
|
||||
*
|
||||
* Description:
|
||||
* This is just a wrapper to handle the annoying behavior of semaphore
|
||||
@ -679,7 +679,7 @@ static int stm32l4_takesem(FAR sem_t *sem)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int stm32l4_takesem_uninterruptible(sem_t *sem)
|
||||
static int stm32l4_takesem_noncancelable(sem_t *sem)
|
||||
{
|
||||
int result;
|
||||
int ret = OK;
|
||||
@ -4268,7 +4268,7 @@ static int stm32l4_epfree(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep)
|
||||
|
||||
/* We must have exclusive access to the USB host hardware and state structures */
|
||||
|
||||
ret = stm32l4_takesem_uninterruptible(&priv->exclsem);
|
||||
ret = stm32l4_takesem_noncancelable(&priv->exclsem);
|
||||
|
||||
/* A single channel is represent by an index in the range of 0 to
|
||||
* STM32L4_MAX_TX_FIFOS. Otherwise, the ep must be a pointer to an
|
||||
|
Loading…
Reference in New Issue
Block a user