diff --git a/arch/arm/src/am335x/am335x_i2c.c b/arch/arm/src/am335x/am335x_i2c.c index c96b3c123e..09d0d0daaa 100644 --- a/arch/arm/src/am335x/am335x_i2c.c +++ b/arch/arm/src/am335x/am335x_i2c.c @@ -763,7 +763,7 @@ static inline void am335x_i2c_sem_init(FAR struct am335x_i2c_priv_s *priv) */ nxsem_init(&priv->sem_isr, 0, 0); - nxsem_setprotocol(&priv->sem_isr, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->sem_isr, SEM_PRIO_NONE); #endif } diff --git a/arch/arm/src/cxd56xx/cxd56_ge2d.c b/arch/arm/src/cxd56xx/cxd56_ge2d.c index 48cdb2da98..bdacfe1950 100644 --- a/arch/arm/src/cxd56xx/cxd56_ge2d.c +++ b/arch/arm/src/cxd56xx/cxd56_ge2d.c @@ -248,7 +248,7 @@ int cxd56_ge2dinitialize(FAR const char *devname) nxsem_init(&g_lock, 0, 1); nxsem_init(&g_wait, 0, 0); - nxsem_setprotocol(&g_wait, SEM_PRIO_NONE); + nxsem_set_protocol(&g_wait, SEM_PRIO_NONE); ret = register_driver(devname, &g_ge2dfops, 0666, NULL); if (ret != 0) diff --git a/arch/arm/src/cxd56xx/cxd56_i2c.c b/arch/arm/src/cxd56xx/cxd56_i2c.c index 24cbd309e7..487f95f6ba 100644 --- a/arch/arm/src/cxd56xx/cxd56_i2c.c +++ b/arch/arm/src/cxd56xx/cxd56_i2c.c @@ -619,7 +619,7 @@ static int cxd56_i2c_transfer(FAR struct i2c_master_s *dev, * be performed normally. */ - ret = nxsem_getvalue(&priv->wait, &semval); + ret = nxsem_get_value(&priv->wait, &semval); DEBUGASSERT(ret == OK && semval == 0); /* Disable clock gating (clock enable) */ diff --git a/arch/arm/src/cxd56xx/cxd56_sdhci.c b/arch/arm/src/cxd56xx/cxd56_sdhci.c index d6e556aa3f..d594bbb78d 100644 --- a/arch/arm/src/cxd56xx/cxd56_sdhci.c +++ b/arch/arm/src/cxd56xx/cxd56_sdhci.c @@ -1423,7 +1423,7 @@ static void cxd56_sdio_sdhci_reset(FAR struct sdio_dev_s *dev) * priority inheritance enabled. */ - nxsem_setprotocol(&priv->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->waitsem, SEM_PRIO_NONE); /* Create a watchdog timer */ diff --git a/arch/arm/src/efm32/efm32_i2c.c b/arch/arm/src/efm32/efm32_i2c.c index d4fac824a5..abe87e4060 100644 --- a/arch/arm/src/efm32/efm32_i2c.c +++ b/arch/arm/src/efm32/efm32_i2c.c @@ -702,7 +702,7 @@ static inline void efm32_i2c_sem_init(FAR struct efm32_i2c_priv_s *priv) */ nxsem_init(&priv->sem_isr, 0, 0); - nxsem_setprotocol(&priv->sem_isr, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->sem_isr, SEM_PRIO_NONE); #endif } diff --git a/arch/arm/src/efm32/efm32_spi.c b/arch/arm/src/efm32/efm32_spi.c index 90533ed19a..5be0432f34 100644 --- a/arch/arm/src/efm32/efm32_spi.c +++ b/arch/arm/src/efm32/efm32_spi.c @@ -1638,8 +1638,8 @@ static int spi_portinitialize(struct efm32_spidev_s *priv) * priority inheritance enabled. */ - nxsem_setprotocol(&priv->rxdmasem, SEM_PRIO_NONE); - nxsem_setprotocol(&priv->txdmasem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->rxdmasem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->txdmasem, SEM_PRIO_NONE); #endif /* Enable SPI */ diff --git a/arch/arm/src/efm32/efm32_usbhost.c b/arch/arm/src/efm32/efm32_usbhost.c index c39d77ae8a..34fb00d963 100644 --- a/arch/arm/src/efm32/efm32_usbhost.c +++ b/arch/arm/src/efm32/efm32_usbhost.c @@ -5287,7 +5287,7 @@ static inline void efm32_sw_initialize(FAR struct efm32_usbhost_s *priv) * priority inheritance enabled. */ - nxsem_setprotocol(&priv->pscsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->pscsem, SEM_PRIO_NONE); /* Initialize the driver state data */ @@ -5312,7 +5312,7 @@ static inline void efm32_sw_initialize(FAR struct efm32_usbhost_s *priv) */ nxsem_init(&chan->waitsem, 0, 0); - nxsem_setprotocol(&chan->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&chan->waitsem, SEM_PRIO_NONE); } } diff --git a/arch/arm/src/imx1/imx_spi.c b/arch/arm/src/imx1/imx_spi.c index b470b91712..3d29b751b3 100644 --- a/arch/arm/src/imx1/imx_spi.c +++ b/arch/arm/src/imx1/imx_spi.c @@ -1114,7 +1114,7 @@ FAR struct spi_dev_s *imx_spibus_initialize(int port) */ nxsem_init(&priv->waitsem, 0, 0); - nxsem_setprotocol(&priv->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->waitsem, SEM_PRIO_NONE); #endif nxsem_init(&priv->exclsem, 0, 1); diff --git a/arch/arm/src/imx6/imx_ecspi.c b/arch/arm/src/imx6/imx_ecspi.c index 2429e655a4..bd32a2eced 100644 --- a/arch/arm/src/imx6/imx_ecspi.c +++ b/arch/arm/src/imx6/imx_ecspi.c @@ -1291,7 +1291,7 @@ FAR struct spi_dev_s *imx_spibus_initialize(int port) */ nxsem_init(&priv->waitsem, 0, 0); - nxsem_setprotocol(&priv->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->waitsem, SEM_PRIO_NONE); #endif nxsem_init(&priv->exclsem, 0, 1); diff --git a/arch/arm/src/imxrt/imxrt_edma.c b/arch/arm/src/imxrt/imxrt_edma.c index 521ab49552..3705b6e967 100644 --- a/arch/arm/src/imxrt/imxrt_edma.c +++ b/arch/arm/src/imxrt/imxrt_edma.c @@ -773,7 +773,7 @@ void weak_function arm_dma_initialize(void) * hence, should not have priority inheritance enabled. */ - nxsem_setprotocol(&g_edma.dsem, SEM_PRIO_NONE); + nxsem_set_protocol(&g_edma.dsem, SEM_PRIO_NONE); /* Initialize the list of free TCDs from the pool of pre-allocated TCDs. */ diff --git a/arch/arm/src/imxrt/imxrt_ehci.c b/arch/arm/src/imxrt/imxrt_ehci.c index 5f3edc2435..1df6c700ca 100644 --- a/arch/arm/src/imxrt/imxrt_ehci.c +++ b/arch/arm/src/imxrt/imxrt_ehci.c @@ -4036,7 +4036,7 @@ static int imxrt_epalloc(FAR struct usbhost_driver_s *drvr, */ nxsem_init(&epinfo->iocsem, 0, 0); - nxsem_setprotocol(&epinfo->iocsem, SEM_PRIO_NONE); + nxsem_set_protocol(&epinfo->iocsem, SEM_PRIO_NONE); /* Success.. return an opaque reference to the endpoint information * structure instance @@ -5058,7 +5058,7 @@ FAR struct usbhost_connection_s *imxrt_ehci_initialize(int controller) * priority inheritance enabled. */ - nxsem_setprotocol(&g_ehci.pscsem, SEM_PRIO_NONE); + nxsem_set_protocol(&g_ehci.pscsem, SEM_PRIO_NONE); /* Initialize EP0 */ @@ -5102,7 +5102,7 @@ FAR struct usbhost_connection_s *imxrt_ehci_initialize(int controller) */ nxsem_init(&rhport->ep0.iocsem, 0, 0); - nxsem_setprotocol(&rhport->ep0.iocsem, SEM_PRIO_NONE); + nxsem_set_protocol(&rhport->ep0.iocsem, SEM_PRIO_NONE); /* Initialize the public port representation */ diff --git a/arch/arm/src/imxrt/imxrt_lpi2c.c b/arch/arm/src/imxrt/imxrt_lpi2c.c index 156f172595..71edd59914 100644 --- a/arch/arm/src/imxrt/imxrt_lpi2c.c +++ b/arch/arm/src/imxrt/imxrt_lpi2c.c @@ -877,7 +877,7 @@ static inline void imxrt_lpi2c_sem_init(FAR struct imxrt_lpi2c_priv_s *priv) */ nxsem_init(&priv->sem_isr, 0, 0); - nxsem_setprotocol(&priv->sem_isr, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->sem_isr, SEM_PRIO_NONE); #endif } diff --git a/arch/arm/src/imxrt/imxrt_usdhc.c b/arch/arm/src/imxrt/imxrt_usdhc.c index 6baa4c326d..b3da9035a9 100644 --- a/arch/arm/src/imxrt/imxrt_usdhc.c +++ b/arch/arm/src/imxrt/imxrt_usdhc.c @@ -3117,7 +3117,7 @@ FAR struct sdio_dev_s *imxrt_usdhc_initialize(int slotno) * have priority inheritance enabled. */ - nxsem_setprotocol(&priv->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->waitsem, SEM_PRIO_NONE); /* Create a watchdog timer */ diff --git a/arch/arm/src/kinetis/kinetis_i2c.c b/arch/arm/src/kinetis/kinetis_i2c.c index 6fc856c001..e732a766b9 100644 --- a/arch/arm/src/kinetis/kinetis_i2c.c +++ b/arch/arm/src/kinetis/kinetis_i2c.c @@ -332,7 +332,7 @@ static inline void kinetis_i2c_sem_init(FAR struct kinetis_i2cdev_s *priv) */ nxsem_init(&priv->wait, 0, 0); - nxsem_setprotocol(&priv->wait, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->wait, SEM_PRIO_NONE); } /**************************************************************************** diff --git a/arch/arm/src/kinetis/kinetis_sdhc.c b/arch/arm/src/kinetis/kinetis_sdhc.c index b43a0608e9..a1e0bff31c 100644 --- a/arch/arm/src/kinetis/kinetis_sdhc.c +++ b/arch/arm/src/kinetis/kinetis_sdhc.c @@ -2877,7 +2877,7 @@ FAR struct sdio_dev_s *sdhc_initialize(int slotno) * priority inheritance enabled. */ - nxsem_setprotocol(&priv->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->waitsem, SEM_PRIO_NONE); /* Create a watchdog timer */ diff --git a/arch/arm/src/lc823450/lc823450_sdc.c b/arch/arm/src/lc823450/lc823450_sdc.c index 5f47694801..d91555f4c3 100644 --- a/arch/arm/src/lc823450/lc823450_sdc.c +++ b/arch/arm/src/lc823450/lc823450_sdc.c @@ -699,7 +699,7 @@ int lc823450_sdc_locked(void) for (i = 0; i < 2; i++) { - nxsem_getvalue(&_sdc_sem[i], &val); + nxsem_get_value(&_sdc_sem[i], &val); if (1 != val) { ret = 1; diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_i2c.c b/arch/arm/src/lpc17xx_40xx/lpc17_40_i2c.c index 3a0228920e..f022c4e3d2 100644 --- a/arch/arm/src/lpc17xx_40xx/lpc17_40_i2c.c +++ b/arch/arm/src/lpc17xx_40xx/lpc17_40_i2c.c @@ -627,7 +627,7 @@ struct i2c_master_s *lpc17_40_i2cbus_initialize(int port) * priority inheritance enabled. */ - nxsem_setprotocol(&priv->wait, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->wait, SEM_PRIO_NONE); /* Allocate a watchdog timer */ diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_sdcard.c b/arch/arm/src/lpc17xx_40xx/lpc17_40_sdcard.c index 1791b6c64c..c51af148a9 100644 --- a/arch/arm/src/lpc17xx_40xx/lpc17_40_sdcard.c +++ b/arch/arm/src/lpc17xx_40xx/lpc17_40_sdcard.c @@ -2792,7 +2792,7 @@ FAR struct sdio_dev_s *sdio_initialize(int slotno) * priority inheritance enabled. */ - nxsem_setprotocol(&priv->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->waitsem, SEM_PRIO_NONE); /* Create a watchdog timer */ diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_usbhost.c b/arch/arm/src/lpc17xx_40xx/lpc17_40_usbhost.c index bf4f738e14..a95287cc46 100644 --- a/arch/arm/src/lpc17xx_40xx/lpc17_40_usbhost.c +++ b/arch/arm/src/lpc17xx_40xx/lpc17_40_usbhost.c @@ -2360,7 +2360,7 @@ static int lpc17_40_epalloc(struct usbhost_driver_s *drvr, */ nxsem_init(&ed->wdhsem, 0, 0); - nxsem_setprotocol(&ed->wdhsem, SEM_PRIO_NONE); + nxsem_set_protocol(&ed->wdhsem, SEM_PRIO_NONE); /* Link the common tail TD to the ED's TD list */ @@ -3804,7 +3804,7 @@ struct usbhost_connection_s *lpc17_40_usbhost_initialize(int controller) * have priority inheritance enabled. */ - nxsem_setprotocol(&priv->pscsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->pscsem, SEM_PRIO_NONE); #ifndef CONFIG_USBHOST_INT_DISABLE priv->ininterval = MAX_PERINTERVAL; @@ -3902,7 +3902,7 @@ struct usbhost_connection_s *lpc17_40_usbhost_initialize(int controller) */ nxsem_init(&EDCTRL->wdhsem, 0, 0); - nxsem_setprotocol(&EDCTRL->wdhsem, SEM_PRIO_NONE); + nxsem_set_protocol(&EDCTRL->wdhsem, SEM_PRIO_NONE); /* Initialize user-configurable EDs */ diff --git a/arch/arm/src/lpc2378/lpc23xx_i2c.c b/arch/arm/src/lpc2378/lpc23xx_i2c.c index 3dc29b5eb3..8bfb7a11bb 100644 --- a/arch/arm/src/lpc2378/lpc23xx_i2c.c +++ b/arch/arm/src/lpc2378/lpc23xx_i2c.c @@ -588,7 +588,7 @@ struct i2c_master_s *lpc2378_i2cbus_initialize(int port) * priority inheritance enabled. */ - nxsem_setprotocol(&priv->wait, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->wait, SEM_PRIO_NONE); /* Allocate a watchdog timer */ diff --git a/arch/arm/src/lpc31xx/lpc31_ehci.c b/arch/arm/src/lpc31xx/lpc31_ehci.c index b5a4aa77ee..efb4d6fbbf 100644 --- a/arch/arm/src/lpc31xx/lpc31_ehci.c +++ b/arch/arm/src/lpc31xx/lpc31_ehci.c @@ -4043,7 +4043,7 @@ static int lpc31_epalloc(FAR struct usbhost_driver_s *drvr, */ nxsem_init(&epinfo->iocsem, 0, 0); - nxsem_setprotocol(&epinfo->iocsem, SEM_PRIO_NONE); + nxsem_set_protocol(&epinfo->iocsem, SEM_PRIO_NONE); /* Success.. return an opaque reference to the endpoint information * structure instance @@ -5064,7 +5064,7 @@ FAR struct usbhost_connection_s *lpc31_ehci_initialize(int controller) * priority inheritance enabled. */ - nxsem_setprotocol(&g_ehci.pscsem, SEM_PRIO_NONE); + nxsem_set_protocol(&g_ehci.pscsem, SEM_PRIO_NONE); /* Initialize EP0 */ @@ -5108,7 +5108,7 @@ FAR struct usbhost_connection_s *lpc31_ehci_initialize(int controller) */ nxsem_init(&rhport->ep0.iocsem, 0, 0); - nxsem_setprotocol(&rhport->iocsem, SEM_PRIO_NONE); + nxsem_set_protocol(&rhport->iocsem, SEM_PRIO_NONE); /* Initialize the public port representation */ diff --git a/arch/arm/src/lpc31xx/lpc31_i2c.c b/arch/arm/src/lpc31xx/lpc31_i2c.c index f02caca767..71f1cafcfa 100644 --- a/arch/arm/src/lpc31xx/lpc31_i2c.c +++ b/arch/arm/src/lpc31xx/lpc31_i2c.c @@ -558,7 +558,7 @@ struct i2c_master_s *lpc31_i2cbus_initialize(int port) * priority inheritance enabled. */ - nxsem_setprotocol(&priv->wait, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->wait, SEM_PRIO_NONE); /* Enable I2C system clocks */ diff --git a/arch/arm/src/lpc43xx/lpc43_ehci.c b/arch/arm/src/lpc43xx/lpc43_ehci.c index f75b9627b9..67af67306a 100644 --- a/arch/arm/src/lpc43xx/lpc43_ehci.c +++ b/arch/arm/src/lpc43xx/lpc43_ehci.c @@ -3881,7 +3881,7 @@ static int lpc43_epalloc(FAR struct usbhost_driver_s *drvr, */ nxsem_init(&epinfo->iocsem, 0, 0); - nxsem_setprotocol(&epinfo->iocsem, SEM_PRIO_NONE); + nxsem_set_protocol(&epinfo->iocsem, SEM_PRIO_NONE); /* Success.. return an opaque reference to the endpoint information * structure instance @@ -4896,7 +4896,7 @@ FAR struct usbhost_connection_s *lpc43_ehci_initialize(int controller) * priority inheritance enabled. */ - nxsem_setprotocol(&g_ehci.pscsem, SEM_PRIO_NONE); + nxsem_set_protocol(&g_ehci.pscsem, SEM_PRIO_NONE); /* Initialize EP0 */ @@ -4940,7 +4940,7 @@ FAR struct usbhost_connection_s *lpc43_ehci_initialize(int controller) */ nxsem_init(&rhport->ep0.iocsem, 0, 0); - nxsem_setprotocol(&rhport->ep0.iocsem, SEM_PRIO_NONE); + nxsem_set_protocol(&rhport->ep0.iocsem, SEM_PRIO_NONE); /* Initialize the public port representation */ diff --git a/arch/arm/src/lpc43xx/lpc43_i2c.c b/arch/arm/src/lpc43xx/lpc43_i2c.c index da1c32fe02..ec31bcfddf 100644 --- a/arch/arm/src/lpc43xx/lpc43_i2c.c +++ b/arch/arm/src/lpc43xx/lpc43_i2c.c @@ -533,7 +533,7 @@ struct i2c_master_s *lpc43_i2cbus_initialize(int port) * priority inheritance enabled. */ - nxsem_setprotocol(&priv->wait, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->wait, SEM_PRIO_NONE); /* Allocate a watchdog timer */ diff --git a/arch/arm/src/lpc43xx/lpc43_sdmmc.c b/arch/arm/src/lpc43xx/lpc43_sdmmc.c index 48a36783ca..18c7e8552f 100644 --- a/arch/arm/src/lpc43xx/lpc43_sdmmc.c +++ b/arch/arm/src/lpc43xx/lpc43_sdmmc.c @@ -2881,7 +2881,7 @@ FAR struct sdio_dev_s *lpc43_sdmmc_initialize(int slotno) * priority inheritance enabled. */ - nxsem_setprotocol(&priv->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->waitsem, SEM_PRIO_NONE); /* Create a watchdog timer */ diff --git a/arch/arm/src/lpc54xx/lpc54_i2c_master.c b/arch/arm/src/lpc54xx/lpc54_i2c_master.c index e766ae6177..4c3d7a0cb5 100644 --- a/arch/arm/src/lpc54xx/lpc54_i2c_master.c +++ b/arch/arm/src/lpc54xx/lpc54_i2c_master.c @@ -1213,7 +1213,7 @@ struct i2c_master_s *lpc54_i2cbus_initialize(int port) * priority inheritance enabled. */ - nxsem_setprotocol(&priv->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->waitsem, SEM_PRIO_NONE); #endif /* Allocate a watchdog timer */ diff --git a/arch/arm/src/lpc54xx/lpc54_sdmmc.c b/arch/arm/src/lpc54xx/lpc54_sdmmc.c index 754b9b39aa..7cba59d7eb 100644 --- a/arch/arm/src/lpc54xx/lpc54_sdmmc.c +++ b/arch/arm/src/lpc54xx/lpc54_sdmmc.c @@ -2888,7 +2888,7 @@ FAR struct sdio_dev_s *lpc54_sdmmc_initialize(int slotno) * priority inheritance enabled. */ - nxsem_setprotocol(&priv->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->waitsem, SEM_PRIO_NONE); /* Create a watchdog timer */ diff --git a/arch/arm/src/lpc54xx/lpc54_usb0_ohci.c b/arch/arm/src/lpc54xx/lpc54_usb0_ohci.c index ef4fa07956..f2ec2b2e69 100644 --- a/arch/arm/src/lpc54xx/lpc54_usb0_ohci.c +++ b/arch/arm/src/lpc54xx/lpc54_usb0_ohci.c @@ -2445,7 +2445,7 @@ static int lpc54_epalloc(struct usbhost_driver_s *drvr, */ nxsem_init(&ed->wdhsem, 0, 0); - nxsem_setprotocol(&ed->wdhsem, SEM_PRIO_NONE); + nxsem_set_protocol(&ed->wdhsem, SEM_PRIO_NONE); /* Link the common tail TD to the ED's TD list */ @@ -3880,7 +3880,7 @@ struct usbhost_connection_s *lpc54_usbhost_initialize(int controller) * priority inheritance enabled. */ - nxsem_setprotocol(&priv->pscsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->pscsem, SEM_PRIO_NONE); #ifndef CONFIG_OHCI_INT_DISABLE priv->ininterval = MAX_PERINTERVAL; @@ -3970,7 +3970,7 @@ struct usbhost_connection_s *lpc54_usbhost_initialize(int controller) */ nxsem_init(&EDCTRL->wdhsem, 0, 0); - nxsem_setprotocol(&EDCTRL->wdhsem, SEM_PRIO_NONE); + nxsem_set_protocol(&EDCTRL->wdhsem, SEM_PRIO_NONE); /* Initialize user-configurable EDs */ diff --git a/arch/arm/src/nrf52/nrf52_i2c.c b/arch/arm/src/nrf52/nrf52_i2c.c index 1ee0221f52..df8dd6282a 100644 --- a/arch/arm/src/nrf52/nrf52_i2c.c +++ b/arch/arm/src/nrf52/nrf52_i2c.c @@ -597,7 +597,7 @@ static int nrf52_i2c_sem_init(FAR struct nrf52_i2c_priv_s *priv) */ nxsem_init(&priv->sem_isr, 0, 0); - nxsem_setprotocol(&priv->sem_isr, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->sem_isr, SEM_PRIO_NONE); #endif return OK; diff --git a/arch/arm/src/nrf52/nrf52_radio.c b/arch/arm/src/nrf52/nrf52_radio.c index 0853a99c04..bd9609c921 100644 --- a/arch/arm/src/nrf52/nrf52_radio.c +++ b/arch/arm/src/nrf52/nrf52_radio.c @@ -1171,7 +1171,7 @@ nrf52_radio_initialize(int intf, FAR struct nrf52_radio_board_s *board) */ nxsem_init(&dev->sem_isr, 0, 0); - nxsem_setprotocol(&dev->sem_isr, SEM_PRIO_NONE); + nxsem_set_protocol(&dev->sem_isr, SEM_PRIO_NONE); /* Connect board-specific data */ diff --git a/arch/arm/src/nrf52/nrf52_rng.c b/arch/arm/src/nrf52/nrf52_rng.c index d90f2fbf42..02921cea2a 100644 --- a/arch/arm/src/nrf52/nrf52_rng.c +++ b/arch/arm/src/nrf52/nrf52_rng.c @@ -144,10 +144,10 @@ static int nrf52_rng_initialize(void) memset(&g_rngdev, 0, sizeof(struct rng_dev_s)); nxsem_init(&g_rngdev.rd_sem, 0, 0); - nxsem_setprotocol(&g_rngdev.rd_sem, SEM_PRIO_NONE); + nxsem_set_protocol(&g_rngdev.rd_sem, SEM_PRIO_NONE); nxsem_init(&g_rngdev.excl_sem, 0, 1); - nxsem_setprotocol(&g_rngdev.excl_sem, SEM_PRIO_NONE); + nxsem_set_protocol(&g_rngdev.excl_sem, SEM_PRIO_NONE); _info("Ready to stop\n"); nrf52_rng_stop(); diff --git a/arch/arm/src/nrf52/nrf52_spi.c b/arch/arm/src/nrf52/nrf52_spi.c index 20757096ee..73970f29e1 100644 --- a/arch/arm/src/nrf52/nrf52_spi.c +++ b/arch/arm/src/nrf52/nrf52_spi.c @@ -994,7 +994,7 @@ FAR struct spi_dev_s *nrf52_spibus_initialize(int port) */ nxsem_init(&priv->sem_isr, 0, 0); - nxsem_setprotocol(&priv->sem_isr, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->sem_isr, SEM_PRIO_NONE); /* Attach SPI interrupt */ diff --git a/arch/arm/src/s32k1xx/s32k1xx_edma.c b/arch/arm/src/s32k1xx/s32k1xx_edma.c index 8b56fc78dd..f8ed7b747d 100644 --- a/arch/arm/src/s32k1xx/s32k1xx_edma.c +++ b/arch/arm/src/s32k1xx/s32k1xx_edma.c @@ -743,7 +743,7 @@ void weak_function arm_dma_initialize(void) * hence, should not have priority inheritance enabled. */ - nxsem_setprotocol(&g_edma.dsem, SEM_PRIO_NONE); + nxsem_set_protocol(&g_edma.dsem, SEM_PRIO_NONE); /* Initialize the list of free TCDs from the pool of pre-allocated TCDs. */ diff --git a/arch/arm/src/s32k1xx/s32k1xx_lpi2c.c b/arch/arm/src/s32k1xx/s32k1xx_lpi2c.c index 6e1758ee59..2eb9f19aec 100644 --- a/arch/arm/src/s32k1xx/s32k1xx_lpi2c.c +++ b/arch/arm/src/s32k1xx/s32k1xx_lpi2c.c @@ -789,7 +789,7 @@ static inline void */ nxsem_init(&priv->sem_isr, 0, 0); - nxsem_setprotocol(&priv->sem_isr, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->sem_isr, SEM_PRIO_NONE); #endif } diff --git a/arch/arm/src/sam34/sam_hsmci.c b/arch/arm/src/sam34/sam_hsmci.c index 2c7e6d2ccd..45f7a84b53 100644 --- a/arch/arm/src/sam34/sam_hsmci.c +++ b/arch/arm/src/sam34/sam_hsmci.c @@ -2719,7 +2719,7 @@ FAR struct sdio_dev_s *sdio_initialize(int slotno) * priority inheritance enabled. */ - nxsem_setprotocol(&priv->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->waitsem, SEM_PRIO_NONE); /* Create a watchdog timer */ diff --git a/arch/arm/src/sam34/sam_spi.c b/arch/arm/src/sam34/sam_spi.c index b999420c5e..88a18b2b5a 100644 --- a/arch/arm/src/sam34/sam_spi.c +++ b/arch/arm/src/sam34/sam_spi.c @@ -1888,7 +1888,7 @@ struct spi_dev_s *sam_spibus_initialize(int port) */ nxsem_init(&spics->dmawait, 0, 0); - nxsem_setprotocol(&spics->dmawait, SEM_PRIO_NONE); + nxsem_set_protocol(&spics->dmawait, SEM_PRIO_NONE); /* Create a watchdog time to catch DMA timeouts */ diff --git a/arch/arm/src/sam34/sam_twi.c b/arch/arm/src/sam34/sam_twi.c index 50a424b89e..aa67833253 100644 --- a/arch/arm/src/sam34/sam_twi.c +++ b/arch/arm/src/sam34/sam_twi.c @@ -981,7 +981,7 @@ struct i2c_master_s *sam_i2cbus_initialize(int bus) * priority inheritance enabled. */ - nxsem_setprotocol(&priv->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->waitsem, SEM_PRIO_NONE); /* Allocate a watchdog timer */ diff --git a/arch/arm/src/sama5/sam_ehci.c b/arch/arm/src/sama5/sam_ehci.c index df8cf3499e..f372908975 100644 --- a/arch/arm/src/sama5/sam_ehci.c +++ b/arch/arm/src/sama5/sam_ehci.c @@ -3800,7 +3800,7 @@ static int sam_epalloc(FAR struct usbhost_driver_s *drvr, */ nxsem_init(&epinfo->iocsem, 0, 0); - nxsem_setprotocol(&epinfo->iocsem, SEM_PRIO_NONE); + nxsem_set_protocol(&epinfo->iocsem, SEM_PRIO_NONE); /* Success.. return an opaque reference to the endpoint information * structure instance @@ -4874,7 +4874,7 @@ FAR struct usbhost_connection_s *sam_ehci_initialize(int controller) * priority inheritance enabled. */ - nxsem_setprotocol(&g_ehci.pscsem, SEM_PRIO_NONE); + nxsem_set_protocol(&g_ehci.pscsem, SEM_PRIO_NONE); /* Initialize EP0 */ @@ -4918,7 +4918,7 @@ FAR struct usbhost_connection_s *sam_ehci_initialize(int controller) */ nxsem_init(&rhport->ep0.iocsem, 0, 0); - nxsem_setprotocol(&rhport->ep0.iocsem, SEM_PRIO_NONE); + nxsem_set_protocol(&rhport->ep0.iocsem, SEM_PRIO_NONE); /* Initialize the public port representation */ diff --git a/arch/arm/src/sama5/sam_hsmci.c b/arch/arm/src/sama5/sam_hsmci.c index f295a17104..dbf725099e 100644 --- a/arch/arm/src/sama5/sam_hsmci.c +++ b/arch/arm/src/sama5/sam_hsmci.c @@ -3344,7 +3344,7 @@ FAR struct sdio_dev_s *sdio_initialize(int slotno) * priority inheritance enabled. */ - nxsem_setprotocol(&priv->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->waitsem, SEM_PRIO_NONE); /* Create a watchdog timer */ diff --git a/arch/arm/src/sama5/sam_nand.c b/arch/arm/src/sama5/sam_nand.c index dbe54cacbf..467fd8d544 100644 --- a/arch/arm/src/sama5/sam_nand.c +++ b/arch/arm/src/sama5/sam_nand.c @@ -2976,7 +2976,7 @@ struct mtd_dev_s *sam_nand_initialize(int cs) */ nxsem_init(&priv->waitsem, 0, 0); - nxsem_setprotocol(&priv->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->waitsem, SEM_PRIO_NONE); #endif /* Perform one-time, global NFC/PMECC initialization */ @@ -2995,7 +2995,7 @@ struct mtd_dev_s *sam_nand_initialize(int cs) */ nxsem_init(&g_nand.waitsem, 0, 0); - nxsem_setprotocol(&g_nand.waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&g_nand.waitsem, SEM_PRIO_NONE); #endif /* Enable the NAND FLASH Controller (The NFC is always used) */ diff --git a/arch/arm/src/sama5/sam_ohci.c b/arch/arm/src/sama5/sam_ohci.c index 1043726a76..0854a8ec2e 100644 --- a/arch/arm/src/sama5/sam_ohci.c +++ b/arch/arm/src/sama5/sam_ohci.c @@ -2718,7 +2718,7 @@ static int sam_epalloc(struct usbhost_driver_s *drvr, * priority inheritance enabled. */ - nxsem_setprotocol(&eplist->wdhsem, SEM_PRIO_NONE); + nxsem_set_protocol(&eplist->wdhsem, SEM_PRIO_NONE); /* We must have exclusive access to the ED pool, the bulk list, the * periodic list, and the interrupt table. @@ -4020,7 +4020,7 @@ struct usbhost_connection_s *sam_ohci_initialize(int controller) * priority inheritance enabled. */ - nxsem_setprotocol(&g_ohci.pscsem, SEM_PRIO_NONE); + nxsem_set_protocol(&g_ohci.pscsem, SEM_PRIO_NONE); #ifndef CONFIG_USBHOST_INT_DISABLE g_ohci.ininterval = MAX_PERINTERVAL; diff --git a/arch/arm/src/sama5/sam_spi.c b/arch/arm/src/sama5/sam_spi.c index 6617439e1b..1d88a0239f 100644 --- a/arch/arm/src/sama5/sam_spi.c +++ b/arch/arm/src/sama5/sam_spi.c @@ -1817,7 +1817,7 @@ struct spi_dev_s *sam_spibus_initialize(int port) */ nxsem_init(&spics->dmawait, 0, 0); - nxsem_setprotocol(&spics->dmawait, SEM_PRIO_NONE); + nxsem_set_protocol(&spics->dmawait, SEM_PRIO_NONE); /* Create a watchdog time to catch DMA timeouts */ diff --git a/arch/arm/src/sama5/sam_trng.c b/arch/arm/src/sama5/sam_trng.c index 92bdfe5fb0..901c93f714 100644 --- a/arch/arm/src/sama5/sam_trng.c +++ b/arch/arm/src/sama5/sam_trng.c @@ -360,7 +360,7 @@ static int sam_rng_initialize(void) * priority inheritance enabled. */ - nxsem_setprotocol(&g_trngdev.waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&g_trngdev.waitsem, SEM_PRIO_NONE); /* Enable clocking to the TRNG */ diff --git a/arch/arm/src/sama5/sam_tsd.c b/arch/arm/src/sama5/sam_tsd.c index 1c852dfe96..89fd58552f 100644 --- a/arch/arm/src/sama5/sam_tsd.c +++ b/arch/arm/src/sama5/sam_tsd.c @@ -1664,7 +1664,7 @@ int sam_tsd_register(struct sam_adc_s *adc, int minor) */ nxsem_init(&priv->waitsem, 0, 0); - nxsem_setprotocol(&priv->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->waitsem, SEM_PRIO_NONE); /* Register the device as an input device */ diff --git a/arch/arm/src/sama5/sam_twi.c b/arch/arm/src/sama5/sam_twi.c index 26bbdaaf1a..4e1896201d 100644 --- a/arch/arm/src/sama5/sam_twi.c +++ b/arch/arm/src/sama5/sam_twi.c @@ -1288,7 +1288,7 @@ struct i2c_master_s *sam_i2cbus_initialize(int bus) * priority inheritance enabled. */ - nxsem_setprotocol(&priv->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->waitsem, SEM_PRIO_NONE); /* Perform repeatable TWI hardware initialization */ diff --git a/arch/arm/src/samd2l2/sam_spi.c b/arch/arm/src/samd2l2/sam_spi.c index e76e5ff5b5..33291f8e61 100644 --- a/arch/arm/src/samd2l2/sam_spi.c +++ b/arch/arm/src/samd2l2/sam_spi.c @@ -1431,7 +1431,7 @@ static void spi_dma_setup(struct sam_spidev_s *priv) /* Initialize the semaphore used to notify when DMA is complete */ nxsem_init(&priv->dmasem, 0, 0); - nxsem_setprotocol(&priv->dmasem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->dmasem, SEM_PRIO_NONE); } #endif diff --git a/arch/arm/src/samd5e5/sam_spi.c b/arch/arm/src/samd5e5/sam_spi.c index 09d37eee58..6c7a207385 100644 --- a/arch/arm/src/samd5e5/sam_spi.c +++ b/arch/arm/src/samd5e5/sam_spi.c @@ -1520,7 +1520,7 @@ static void spi_dma_setup(struct sam_spidev_s *priv) /* Initialize the semaphore used to notify when DMA is complete */ nxsem_init(&priv->dmasem, 0, 0); - nxsem_setprotocol(&priv->dmasem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->dmasem, SEM_PRIO_NONE); } #endif diff --git a/arch/arm/src/samv7/sam_hsmci.c b/arch/arm/src/samv7/sam_hsmci.c index e5f8077388..8e71273ca1 100644 --- a/arch/arm/src/samv7/sam_hsmci.c +++ b/arch/arm/src/samv7/sam_hsmci.c @@ -3378,7 +3378,7 @@ FAR struct sdio_dev_s *sdio_initialize(int slotno) * priority inheritance enabled. */ - nxsem_setprotocol(&priv->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->waitsem, SEM_PRIO_NONE); /* Create a watchdog timer */ diff --git a/arch/arm/src/samv7/sam_mcan.c b/arch/arm/src/samv7/sam_mcan.c index 3cc50c9bb1..71420c0c0f 100644 --- a/arch/arm/src/samv7/sam_mcan.c +++ b/arch/arm/src/samv7/sam_mcan.c @@ -1466,7 +1466,7 @@ static void mcan_buffer_reserve(FAR struct sam_mcan_s *priv) flags = enter_critical_section(); txfqs1 = mcan_getreg(priv, SAM_MCAN_TXFQS_OFFSET); - nxsem_getvalue(&priv->txfsem, &sval); + nxsem_get_value(&priv->txfsem, &sval); txfqs2 = mcan_getreg(priv, SAM_MCAN_TXFQS_OFFSET); /* If the semaphore count and the TXFQS samples are in @@ -1611,7 +1611,7 @@ static void mcan_buffer_release(FAR struct sam_mcan_s *priv) * many times. */ - nxsem_getvalue(&priv->txfsem, &sval); + nxsem_get_value(&priv->txfsem, &sval); if (sval < priv->config->ntxfifoq) { nxsem_post(&priv->txfsem); @@ -3111,7 +3111,7 @@ static bool mcan_txready(FAR struct can_dev_s *dev) * the TX FIFO/queue. Make sure that they are consistent. */ - nxsem_getvalue(&priv->txfsem, &sval); + nxsem_get_value(&priv->txfsem, &sval); DEBUGASSERT(((notfull && sval > 0) || (!notfull && sval <= 0)) && (sval <= priv->config->ntxfifoq)); #endif @@ -3182,7 +3182,7 @@ static bool mcan_txempty(FAR struct can_dev_s *dev) * elements, then there is no transfer in progress. */ - nxsem_getvalue(&priv->txfsem, &sval); + nxsem_get_value(&priv->txfsem, &sval); DEBUGASSERT(sval > 0 && sval <= priv->config->ntxfifoq); empty = (sval == priv->config->ntxfifoq); diff --git a/arch/arm/src/samv7/sam_qspi.c b/arch/arm/src/samv7/sam_qspi.c index 20f8e040d9..1bc9c8e101 100644 --- a/arch/arm/src/samv7/sam_qspi.c +++ b/arch/arm/src/samv7/sam_qspi.c @@ -1797,7 +1797,7 @@ struct qspi_dev_s *sam_qspi_initialize(int intf) */ nxsem_init(&priv->dmawait, 0, 0); - nxsem_setprotocol(&priv->dmawait, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->dmawait, SEM_PRIO_NONE); /* Create a watchdog time to catch DMA timeouts */ diff --git a/arch/arm/src/samv7/sam_spi.c b/arch/arm/src/samv7/sam_spi.c index 21b3e8bf78..8ec500445e 100644 --- a/arch/arm/src/samv7/sam_spi.c +++ b/arch/arm/src/samv7/sam_spi.c @@ -2173,7 +2173,7 @@ FAR struct spi_dev_s *sam_spibus_initialize(int port) */ nxsem_init(&spics->dmawait, 0, 0); - nxsem_setprotocol(&spics->dmawait, SEM_PRIO_NONE); + nxsem_set_protocol(&spics->dmawait, SEM_PRIO_NONE); /* Create a watchdog time to catch DMA timeouts */ diff --git a/arch/arm/src/samv7/sam_trng.c b/arch/arm/src/samv7/sam_trng.c index 73907050c7..2ebad4f822 100644 --- a/arch/arm/src/samv7/sam_trng.c +++ b/arch/arm/src/samv7/sam_trng.c @@ -363,7 +363,7 @@ static int sam_rng_initialize(void) * priority inheritance enabled. */ - nxsem_setprotocol(&g_trngdev.waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&g_trngdev.waitsem, SEM_PRIO_NONE); /* Enable clocking to the TRNG */ diff --git a/arch/arm/src/samv7/sam_twihs.c b/arch/arm/src/samv7/sam_twihs.c index 7751dda37d..743b15aa30 100644 --- a/arch/arm/src/samv7/sam_twihs.c +++ b/arch/arm/src/samv7/sam_twihs.c @@ -1456,7 +1456,7 @@ struct i2c_master_s *sam_i2cbus_initialize(int bus) * have priority inheritance enabled. */ - nxsem_setprotocol(&priv->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->waitsem, SEM_PRIO_NONE); /* Perform repeatable TWIHS hardware initialization */ diff --git a/arch/arm/src/samv7/sam_xdmac.c b/arch/arm/src/samv7/sam_xdmac.c index 977fdb4862..e36a433ef5 100644 --- a/arch/arm/src/samv7/sam_xdmac.c +++ b/arch/arm/src/samv7/sam_xdmac.c @@ -1593,7 +1593,7 @@ void sam_dmainitialize(struct sam_xdmac_s *xdmac) * hence, should not have priority inheritance enabled. */ - nxsem_setprotocol(&xdmac->dsem, SEM_PRIO_NONE); + nxsem_set_protocol(&xdmac->dsem, SEM_PRIO_NONE); } /**************************************************************************** diff --git a/arch/arm/src/stm32/stm32_1wire.c b/arch/arm/src/stm32/stm32_1wire.c index 5bf97c2b2c..06f970c08e 100644 --- a/arch/arm/src/stm32/stm32_1wire.c +++ b/arch/arm/src/stm32/stm32_1wire.c @@ -735,7 +735,7 @@ static inline void stm32_1wire_sem_init(FAR struct stm32_1wire_priv_s *priv) * priority inheritance enabled. */ - nxsem_setprotocol(&priv->sem_isr, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->sem_isr, SEM_PRIO_NONE); } /**************************************************************************** diff --git a/arch/arm/src/stm32/stm32_dma2d.c b/arch/arm/src/stm32/stm32_dma2d.c index 03b1c9cca1..17d15ec93b 100644 --- a/arch/arm/src/stm32/stm32_dma2d.c +++ b/arch/arm/src/stm32/stm32_dma2d.c @@ -1110,7 +1110,7 @@ int stm32_dma2dinitialize(void) */ nxsem_init(g_interrupt.sem, 0, 0); - nxsem_setprotocol(g_interrupt.sem, SEM_PRIO_NONE); + nxsem_set_protocol(g_interrupt.sem, SEM_PRIO_NONE); #ifdef CONFIG_STM32_FB_CMAP /* Enable dma2d transfer and clut loading interrupts only */ diff --git a/arch/arm/src/stm32/stm32_hciuart.c b/arch/arm/src/stm32/stm32_hciuart.c index 5ff068b696..2fc5982706 100644 --- a/arch/arm/src/stm32/stm32_hciuart.c +++ b/arch/arm/src/stm32/stm32_hciuart.c @@ -2592,10 +2592,10 @@ void hciuart_initialize(void) /* Initialize signalling semaphores */ nxsem_init(&state->rxwait, 0, 0); - nxsem_setprotocol(&state->rxwait, SEM_PRIO_NONE); + nxsem_set_protocol(&state->rxwait, SEM_PRIO_NONE); nxsem_init(&state->txwait, 0, 0); - nxsem_setprotocol(&state->txwait, SEM_PRIO_NONE); + nxsem_set_protocol(&state->txwait, SEM_PRIO_NONE); /* Attach and enable the HCI UART IRQ */ diff --git a/arch/arm/src/stm32/stm32_i2c.c b/arch/arm/src/stm32/stm32_i2c.c index 89cf5982e1..b9d2be55b2 100644 --- a/arch/arm/src/stm32/stm32_i2c.c +++ b/arch/arm/src/stm32/stm32_i2c.c @@ -771,7 +771,7 @@ static inline void stm32_i2c_sem_init(FAR struct stm32_i2c_priv_s *priv) */ nxsem_init(&priv->sem_isr, 0, 0); - nxsem_setprotocol(&priv->sem_isr, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->sem_isr, SEM_PRIO_NONE); #endif } diff --git a/arch/arm/src/stm32/stm32_i2c_alt.c b/arch/arm/src/stm32/stm32_i2c_alt.c index 76d8d01c49..a64aa81809 100644 --- a/arch/arm/src/stm32/stm32_i2c_alt.c +++ b/arch/arm/src/stm32/stm32_i2c_alt.c @@ -780,7 +780,7 @@ static inline void stm32_i2c_sem_init(FAR struct stm32_i2c_priv_s *priv) */ nxsem_init(&priv->sem_isr, 0, 0); - nxsem_setprotocol(&priv->sem_isr, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->sem_isr, SEM_PRIO_NONE); #endif } diff --git a/arch/arm/src/stm32/stm32_i2c_v2.c b/arch/arm/src/stm32/stm32_i2c_v2.c index 47ca10353a..4c9e525ff3 100644 --- a/arch/arm/src/stm32/stm32_i2c_v2.c +++ b/arch/arm/src/stm32/stm32_i2c_v2.c @@ -1064,7 +1064,7 @@ static inline void stm32_i2c_sem_init(FAR struct i2c_master_s *dev) */ nxsem_init(&((struct stm32_i2c_inst_s *)dev)->priv->sem_isr, 0, 0); - nxsem_setprotocol(&((struct stm32_i2c_inst_s *)dev)->priv->sem_isr, SEM_PRIO_NONE); + nxsem_set_protocol(&((struct stm32_i2c_inst_s *)dev)->priv->sem_isr, SEM_PRIO_NONE); #endif } @@ -2688,7 +2688,7 @@ static int stm32_i2c_pm_prepare(FAR struct pm_callback_s *cb, int domain, /* Check if exclusive lock for I2C bus is held. */ - if (nxsem_getvalue(&priv->sem_excl, &sval) < 0) + if (nxsem_get_value(&priv->sem_excl, &sval) < 0) { DEBUGASSERT(false); return -EINVAL; diff --git a/arch/arm/src/stm32/stm32_ltdc.c b/arch/arm/src/stm32/stm32_ltdc.c index 7d7d5a6a4c..c2f4e9202e 100644 --- a/arch/arm/src/stm32/stm32_ltdc.c +++ b/arch/arm/src/stm32/stm32_ltdc.c @@ -1632,7 +1632,7 @@ static void stm32_ltdc_irqconfig(void) */ nxsem_init(g_interrupt.sem, 0, 0); - nxsem_setprotocol(g_interrupt.sem, SEM_PRIO_NONE); + nxsem_set_protocol(g_interrupt.sem, SEM_PRIO_NONE); /* Attach LTDC interrupt vector */ diff --git a/arch/arm/src/stm32/stm32_otgfshost.c b/arch/arm/src/stm32/stm32_otgfshost.c index 75a7a3f80e..bdb66f53ad 100644 --- a/arch/arm/src/stm32/stm32_otgfshost.c +++ b/arch/arm/src/stm32/stm32_otgfshost.c @@ -5309,7 +5309,7 @@ static inline void stm32_sw_initialize(FAR struct stm32_usbhost_s *priv) * priority inheritance enabled. */ - nxsem_setprotocol(&priv->pscsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->pscsem, SEM_PRIO_NONE); /* Initialize the driver state data */ @@ -5334,7 +5334,7 @@ static inline void stm32_sw_initialize(FAR struct stm32_usbhost_s *priv) */ nxsem_init(&chan->waitsem, 0, 0); - nxsem_setprotocol(&chan->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&chan->waitsem, SEM_PRIO_NONE); } } diff --git a/arch/arm/src/stm32/stm32_otghshost.c b/arch/arm/src/stm32/stm32_otghshost.c index 1c73eb8727..dd73e870ed 100644 --- a/arch/arm/src/stm32/stm32_otghshost.c +++ b/arch/arm/src/stm32/stm32_otghshost.c @@ -5307,7 +5307,7 @@ static inline void stm32_sw_initialize(FAR struct stm32_usbhost_s *priv) * priority inheritance enabled. */ - nxsem_setprotocol(&priv->pscsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->pscsem, SEM_PRIO_NONE); /* Initialize the driver state data */ @@ -5332,7 +5332,7 @@ static inline void stm32_sw_initialize(FAR struct stm32_usbhost_s *priv) */ nxsem_init(&chan->waitsem, 0, 0); - nxsem_setprotocol(&chan->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&chan->waitsem, SEM_PRIO_NONE); } } diff --git a/arch/arm/src/stm32/stm32_rng.c b/arch/arm/src/stm32/stm32_rng.c index a09f940ab4..0a7e7352a6 100644 --- a/arch/arm/src/stm32/stm32_rng.c +++ b/arch/arm/src/stm32/stm32_rng.c @@ -261,7 +261,7 @@ static ssize_t stm32_rng_read(struct file *filep, char *buffer, size_t buflen) */ nxsem_init(&g_rngdev.rd_readsem, 0, 0); - nxsem_setprotocol(&g_rngdev.rd_readsem, SEM_PRIO_NONE); + nxsem_set_protocol(&g_rngdev.rd_readsem, SEM_PRIO_NONE); g_rngdev.rd_buflen = buflen; g_rngdev.rd_buf = buffer; diff --git a/arch/arm/src/stm32/stm32_sdio.c b/arch/arm/src/stm32/stm32_sdio.c index 3d2a8c67dc..e67c5cb985 100644 --- a/arch/arm/src/stm32/stm32_sdio.c +++ b/arch/arm/src/stm32/stm32_sdio.c @@ -3040,7 +3040,7 @@ FAR struct sdio_dev_s *sdio_initialize(int slotno) * priority inheritance enabled. */ - nxsem_setprotocol(&priv->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->waitsem, SEM_PRIO_NONE); /* Create a watchdog timer */ diff --git a/arch/arm/src/stm32/stm32_spi.c b/arch/arm/src/stm32/stm32_spi.c index 362ff8a196..2048286c07 100644 --- a/arch/arm/src/stm32/stm32_spi.c +++ b/arch/arm/src/stm32/stm32_spi.c @@ -2062,8 +2062,8 @@ static void spi_bus_initialize(FAR struct stm32_spidev_s *priv) nxsem_init(&priv->rxsem, 0, 0); nxsem_init(&priv->txsem, 0, 0); - nxsem_setprotocol(&priv->rxsem, SEM_PRIO_NONE); - nxsem_setprotocol(&priv->txsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->rxsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->txsem, SEM_PRIO_NONE); /* Get DMA channels. NOTE: stm32_dmachannel() will always assign the DMA * channel. If the channel is not available, then stm32_dmachannel() will diff --git a/arch/arm/src/stm32/stm32f40xxx_i2c.c b/arch/arm/src/stm32/stm32f40xxx_i2c.c index 3002438103..0ee30e4009 100644 --- a/arch/arm/src/stm32/stm32f40xxx_i2c.c +++ b/arch/arm/src/stm32/stm32f40xxx_i2c.c @@ -826,7 +826,7 @@ static inline void stm32_i2c_sem_init(FAR struct stm32_i2c_priv_s *priv) */ nxsem_init(&priv->sem_isr, 0, 0); - nxsem_setprotocol(&priv->sem_isr, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->sem_isr, SEM_PRIO_NONE); #endif } diff --git a/arch/arm/src/stm32f0l0g0/stm32_i2c.c b/arch/arm/src/stm32f0l0g0/stm32_i2c.c index 41aa582410..ec2842ba31 100644 --- a/arch/arm/src/stm32f0l0g0/stm32_i2c.c +++ b/arch/arm/src/stm32f0l0g0/stm32_i2c.c @@ -1078,7 +1078,7 @@ static inline void stm32_i2c_sem_init(FAR struct i2c_master_s *dev) */ nxsem_init(&((struct stm32_i2c_inst_s *)dev)->priv->sem_isr, 0, 0); - nxsem_setprotocol(&((struct stm32_i2c_inst_s *)dev)->priv->sem_isr, SEM_PRIO_NONE); + nxsem_set_protocol(&((struct stm32_i2c_inst_s *)dev)->priv->sem_isr, SEM_PRIO_NONE); #endif } @@ -2698,7 +2698,7 @@ static int stm32_i2c_pm_prepare(FAR struct pm_callback_s *cb, int domain, /* Check if exclusive lock for I2C bus is held. */ - if (nxsem_getvalue(&priv->sem_excl, &sval) < 0) + if (nxsem_get_value(&priv->sem_excl, &sval) < 0) { DEBUGASSERT(false); return -EINVAL; diff --git a/arch/arm/src/stm32f0l0g0/stm32_rng.c b/arch/arm/src/stm32f0l0g0/stm32_rng.c index 7c4d5065f4..81647c7f59 100644 --- a/arch/arm/src/stm32f0l0g0/stm32_rng.c +++ b/arch/arm/src/stm32f0l0g0/stm32_rng.c @@ -261,7 +261,7 @@ static ssize_t stm32_rng_read(struct file *filep, char *buffer, size_t buflen) */ nxsem_init(&g_rngdev.rd_readsem, 0, 0); - nxsem_setprotocol(&g_rngdev.rd_readsem, SEM_PRIO_NONE); + nxsem_set_protocol(&g_rngdev.rd_readsem, SEM_PRIO_NONE); g_rngdev.rd_buflen = buflen; g_rngdev.rd_buf = buffer; diff --git a/arch/arm/src/stm32f0l0g0/stm32_spi.c b/arch/arm/src/stm32f0l0g0/stm32_spi.c index 478c44d1e2..20b5abcbdc 100644 --- a/arch/arm/src/stm32f0l0g0/stm32_spi.c +++ b/arch/arm/src/stm32f0l0g0/stm32_spi.c @@ -1611,7 +1611,7 @@ static int spi_pm_prepare(FAR struct pm_callback_s *cb, int domain, /* Check if exclusive lock for SPI bus is held. */ - if (nxsem_getvalue(&priv->exclsem, &sval) < 0) + if (nxsem_get_value(&priv->exclsem, &sval) < 0) { DEBUGASSERT(false); return -EINVAL; @@ -1725,8 +1725,8 @@ static void spi_bus_initialize(FAR struct stm32_spidev_s *priv) * priority inheritance enabled. */ - nxsem_setprotocol(&priv->rxsem, SEM_PRIO_NONE); - nxsem_setprotocol(&priv->txsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->rxsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->txsem, SEM_PRIO_NONE); /* Get DMA channels. NOTE: stm32_dmachannel() will always assign the DMA * channel. If the channel is not available, then stm32_dmachannel() will diff --git a/arch/arm/src/stm32f7/stm32_dma2d.c b/arch/arm/src/stm32f7/stm32_dma2d.c index 65546bb3f2..5859f972cf 100644 --- a/arch/arm/src/stm32f7/stm32_dma2d.c +++ b/arch/arm/src/stm32f7/stm32_dma2d.c @@ -1111,7 +1111,7 @@ int stm32_dma2dinitialize(void) */ nxsem_init(g_interrupt.sem, 0, 0); - nxsem_setprotocol(g_interrupt.sem, SEM_PRIO_NONE); + nxsem_set_protocol(g_interrupt.sem, SEM_PRIO_NONE); #ifdef CONFIG_STM32F7_FB_CMAP /* Enable dma2d transfer and clut loading interrupts only */ diff --git a/arch/arm/src/stm32f7/stm32_i2c.c b/arch/arm/src/stm32f7/stm32_i2c.c index 6a2ac884e6..d6a29485b6 100644 --- a/arch/arm/src/stm32f7/stm32_i2c.c +++ b/arch/arm/src/stm32f7/stm32_i2c.c @@ -1102,7 +1102,7 @@ static inline void stm32_i2c_sem_init(FAR struct i2c_master_s *dev) */ nxsem_init(&((struct stm32_i2c_inst_s *)dev)->priv->sem_isr, 0, 0); - nxsem_setprotocol(&((struct stm32_i2c_inst_s *)dev)->priv->sem_isr, SEM_PRIO_NONE); + nxsem_set_protocol(&((struct stm32_i2c_inst_s *)dev)->priv->sem_isr, SEM_PRIO_NONE); #endif } @@ -2726,7 +2726,7 @@ static int stm32_i2c_pm_prepare(FAR struct pm_callback_s *cb, int domain, /* Check if exclusive lock for I2C bus is held. */ - if (nxsem_getvalue(&priv->sem_excl, &sval) < 0) + if (nxsem_get_value(&priv->sem_excl, &sval) < 0) { DEBUGASSERT(false); return -EINVAL; diff --git a/arch/arm/src/stm32f7/stm32_ltdc.c b/arch/arm/src/stm32f7/stm32_ltdc.c index 73dd43aab4..c1e82f499e 100644 --- a/arch/arm/src/stm32f7/stm32_ltdc.c +++ b/arch/arm/src/stm32f7/stm32_ltdc.c @@ -1634,7 +1634,7 @@ static void stm32_ltdc_irqconfig(void) */ nxsem_init(g_interrupt.sem, 0, 0); - nxsem_setprotocol(g_interrupt.sem, SEM_PRIO_NONE); + nxsem_set_protocol(g_interrupt.sem, SEM_PRIO_NONE); /* Attach LTDC interrupt vector */ diff --git a/arch/arm/src/stm32f7/stm32_otghost.c b/arch/arm/src/stm32f7/stm32_otghost.c index eb512acb78..637d4b71cc 100644 --- a/arch/arm/src/stm32f7/stm32_otghost.c +++ b/arch/arm/src/stm32f7/stm32_otghost.c @@ -5296,7 +5296,7 @@ static inline void stm32_sw_initialize(FAR struct stm32_usbhost_s *priv) * priority inheritance enabled. */ - nxsem_setprotocol(&priv->pscsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->pscsem, SEM_PRIO_NONE); /* Initialize the driver state data */ @@ -5321,7 +5321,7 @@ static inline void stm32_sw_initialize(FAR struct stm32_usbhost_s *priv) */ nxsem_init(&chan->waitsem, 0, 0); - nxsem_setprotocol(&chan->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&chan->waitsem, SEM_PRIO_NONE); } } diff --git a/arch/arm/src/stm32f7/stm32_qspi.c b/arch/arm/src/stm32f7/stm32_qspi.c index dfaeea9324..8750176415 100644 --- a/arch/arm/src/stm32f7/stm32_qspi.c +++ b/arch/arm/src/stm32f7/stm32_qspi.c @@ -2600,7 +2600,7 @@ struct qspi_dev_s *stm32f7_qspi_initialize(int intf) */ nxsem_init(&priv->dmawait, 0, 0); - nxsem_setprotocol(&priv->dmawait, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->dmawait, SEM_PRIO_NONE); /* Create a watchdog time to catch DMA timeouts */ @@ -2628,7 +2628,7 @@ struct qspi_dev_s *stm32f7_qspi_initialize(int intf) */ nxsem_init(&priv->op_sem, 0, 0); - nxsem_setprotocol(&priv->op_sem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->op_sem, SEM_PRIO_NONE); #endif /* Perform hardware initialization. Puts the QSPI into an active diff --git a/arch/arm/src/stm32f7/stm32_rng.c b/arch/arm/src/stm32f7/stm32_rng.c index 31ccec2326..98c863f382 100644 --- a/arch/arm/src/stm32f7/stm32_rng.c +++ b/arch/arm/src/stm32f7/stm32_rng.c @@ -282,7 +282,7 @@ static ssize_t stm32_rngread(struct file *filep, char *buffer, size_t buflen) */ nxsem_init(&g_rngdev.rd_readsem, 0, 0); - nxsem_setprotocol(&g_rngdev.rd_readsem, SEM_PRIO_NONE); + nxsem_set_protocol(&g_rngdev.rd_readsem, SEM_PRIO_NONE); g_rngdev.rd_buflen = buflen; g_rngdev.rd_buf = buffer; diff --git a/arch/arm/src/stm32f7/stm32_sdmmc.c b/arch/arm/src/stm32f7/stm32_sdmmc.c index 324fa8c4d5..169f33c9f9 100644 --- a/arch/arm/src/stm32f7/stm32_sdmmc.c +++ b/arch/arm/src/stm32f7/stm32_sdmmc.c @@ -3473,7 +3473,7 @@ FAR struct sdio_dev_s *sdio_initialize(int slotno) * priority inheritance enabled. */ - nxsem_setprotocol(&priv->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->waitsem, SEM_PRIO_NONE); /* Create a watchdog timer */ diff --git a/arch/arm/src/stm32f7/stm32_spi.c b/arch/arm/src/stm32f7/stm32_spi.c index 11c85bccb3..f6b2e6b374 100644 --- a/arch/arm/src/stm32f7/stm32_spi.c +++ b/arch/arm/src/stm32f7/stm32_spi.c @@ -2072,7 +2072,7 @@ static int spi_pm_prepare(FAR struct pm_callback_s *cb, int domain, /* Check if exclusive lock for SPI bus is held. */ - if (nxsem_getvalue(&priv->exclsem, &sval) < 0) + if (nxsem_get_value(&priv->exclsem, &sval) < 0) { DEBUGASSERT(false); return -EINVAL; @@ -2169,8 +2169,8 @@ static void spi_bus_initialize(struct stm32_spidev_s *priv) nxsem_init(&priv->rxsem, 0, 0); nxsem_init(&priv->txsem, 0, 0); - nxsem_setprotocol(&priv->rxsem, SEM_PRIO_NONE); - nxsem_setprotocol(&priv->txsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->rxsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->txsem, SEM_PRIO_NONE); /* Get DMA channels. NOTE: stm32_dmachannel() will always assign the * DMA channel. If the channel is not available, then diff --git a/arch/arm/src/stm32h7/stm32_i2c.c b/arch/arm/src/stm32h7/stm32_i2c.c index 76add7d408..dc577af8ed 100644 --- a/arch/arm/src/stm32h7/stm32_i2c.c +++ b/arch/arm/src/stm32h7/stm32_i2c.c @@ -1055,7 +1055,7 @@ static inline void stm32_i2c_sem_init(FAR struct i2c_master_s *dev) */ nxsem_init(&((struct stm32_i2c_inst_s *)dev)->priv->sem_isr, 0, 0); - nxsem_setprotocol(&((struct stm32_i2c_inst_s *)dev)->priv->sem_isr, SEM_PRIO_NONE); + nxsem_set_protocol(&((struct stm32_i2c_inst_s *)dev)->priv->sem_isr, SEM_PRIO_NONE); #endif } @@ -2671,7 +2671,7 @@ static int stm32_i2c_pm_prepare(FAR struct pm_callback_s *cb, int domain, /* Check if exclusive lock for I2C bus is held. */ - if (nxsem_getvalue(&priv->sem_excl, &sval) < 0) + if (nxsem_get_value(&priv->sem_excl, &sval) < 0) { DEBUGASSERT(false); return -EINVAL; diff --git a/arch/arm/src/stm32h7/stm32_otghost.c b/arch/arm/src/stm32h7/stm32_otghost.c index f9ae3a8d3c..e34132010a 100644 --- a/arch/arm/src/stm32h7/stm32_otghost.c +++ b/arch/arm/src/stm32h7/stm32_otghost.c @@ -5303,7 +5303,7 @@ static inline void stm32_sw_initialize(FAR struct stm32_usbhost_s *priv) * priority inheritance enabled. */ - nxsem_setprotocol(&priv->pscsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->pscsem, SEM_PRIO_NONE); /* Initialize the driver state data */ @@ -5328,7 +5328,7 @@ static inline void stm32_sw_initialize(FAR struct stm32_usbhost_s *priv) */ nxsem_init(&chan->waitsem, 0, 0); - nxsem_setprotocol(&chan->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&chan->waitsem, SEM_PRIO_NONE); } } diff --git a/arch/arm/src/stm32h7/stm32_qspi.c b/arch/arm/src/stm32h7/stm32_qspi.c index 33398955b3..b90db2fb05 100644 --- a/arch/arm/src/stm32h7/stm32_qspi.c +++ b/arch/arm/src/stm32h7/stm32_qspi.c @@ -2667,7 +2667,7 @@ struct qspi_dev_s *stm32h7_qspi_initialize(int intf) */ nxsem_init(&priv->dmawait, 0, 0); - nxsem_setprotocol(&priv->dmawait, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->dmawait, SEM_PRIO_NONE); /* Create a watchdog time to catch DMA timeouts */ @@ -2695,7 +2695,7 @@ struct qspi_dev_s *stm32h7_qspi_initialize(int intf) */ nxsem_init(&priv->op_sem, 0, 0); - nxsem_setprotocol(&priv->op_sem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->op_sem, SEM_PRIO_NONE); #endif /* Perform hardware initialization. Puts the QSPI into an active diff --git a/arch/arm/src/stm32h7/stm32_sdmmc.c b/arch/arm/src/stm32h7/stm32_sdmmc.c index 4c087abe73..5ed135b89a 100644 --- a/arch/arm/src/stm32h7/stm32_sdmmc.c +++ b/arch/arm/src/stm32h7/stm32_sdmmc.c @@ -3528,7 +3528,7 @@ FAR struct sdio_dev_s *sdio_initialize(int slotno) * priority inheritance enabled. */ - nxsem_setprotocol(&priv->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->waitsem, SEM_PRIO_NONE); /* Create a watchdog timer */ diff --git a/arch/arm/src/stm32h7/stm32_spi.c b/arch/arm/src/stm32h7/stm32_spi.c index 896d1aee6f..6bf99b1051 100644 --- a/arch/arm/src/stm32h7/stm32_spi.c +++ b/arch/arm/src/stm32h7/stm32_spi.c @@ -2247,7 +2247,7 @@ static int spi_pm_prepare(FAR struct pm_callback_s *cb, int domain, /* Check if exclusive lock for SPI bus is held. */ - if (nxsem_getvalue(&priv->exclsem, &sval) < 0) + if (nxsem_get_value(&priv->exclsem, &sval) < 0) { DEBUGASSERT(false); return -EINVAL; @@ -2371,8 +2371,8 @@ static void spi_bus_initialize(struct stm32_spidev_s *priv) nxsem_init(&priv->rxsem, 0, 0); nxsem_init(&priv->txsem, 0, 0); - nxsem_setprotocol(&priv->rxsem, SEM_PRIO_NONE); - nxsem_setprotocol(&priv->txsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->rxsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->txsem, SEM_PRIO_NONE); /* Get DMA channels. NOTE: stm32_dmachannel() will always assign the DMA * channel. If the channel is not available, then stm32_dmachannel() will diff --git a/arch/arm/src/stm32l4/stm32l4_1wire.c b/arch/arm/src/stm32l4/stm32l4_1wire.c index 76a733a6e4..af521282d1 100644 --- a/arch/arm/src/stm32l4/stm32l4_1wire.c +++ b/arch/arm/src/stm32l4/stm32l4_1wire.c @@ -655,7 +655,7 @@ static inline void stm32_1wire_sem_init(FAR struct stm32_1wire_priv_s *priv) * priority inheritance enabled. */ - nxsem_setprotocol(&priv->sem_isr, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->sem_isr, SEM_PRIO_NONE); } /**************************************************************************** @@ -1175,7 +1175,7 @@ static int stm32_1wire_pm_prepare(FAR struct pm_callback_s *cb, int domain, /* Check if exclusive lock for 1-Wire bus is held. */ - if (nxsem_getvalue(&priv->sem_excl, &sval) < 0) + if (nxsem_get_value(&priv->sem_excl, &sval) < 0) { DEBUGASSERT(false); return -EINVAL; diff --git a/arch/arm/src/stm32l4/stm32l4_i2c.c b/arch/arm/src/stm32l4/stm32l4_i2c.c index 835013fd17..9ebc7e3639 100644 --- a/arch/arm/src/stm32l4/stm32l4_i2c.c +++ b/arch/arm/src/stm32l4/stm32l4_i2c.c @@ -1096,7 +1096,7 @@ static inline void stm32l4_i2c_sem_init(FAR struct i2c_master_s *dev) */ nxsem_init(&((struct stm32l4_i2c_inst_s *)dev)->priv->sem_isr, 0, 0); - nxsem_setprotocol(&((struct stm32l4_i2c_inst_s *)dev)->priv->sem_isr, + nxsem_set_protocol(&((struct stm32l4_i2c_inst_s *)dev)->priv->sem_isr, SEM_PRIO_NONE); #endif } @@ -2850,7 +2850,7 @@ static int stm32l4_i2c_pm_prepare(FAR struct pm_callback_s *cb, int domain, /* Check if exclusive lock for I2C bus is held. */ - if (nxsem_getvalue(&priv->sem_excl, &sval) < 0) + if (nxsem_get_value(&priv->sem_excl, &sval) < 0) { DEBUGASSERT(false); return -EINVAL; diff --git a/arch/arm/src/stm32l4/stm32l4_otgfshost.c b/arch/arm/src/stm32l4/stm32l4_otgfshost.c index 286ece8531..d158a63e38 100644 --- a/arch/arm/src/stm32l4/stm32l4_otgfshost.c +++ b/arch/arm/src/stm32l4/stm32l4_otgfshost.c @@ -5342,7 +5342,7 @@ static inline void stm32l4_sw_initialize(FAR struct stm32l4_usbhost_s *priv) * priority inheritance enabled. */ - nxsem_setprotocol(&priv->pscsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->pscsem, SEM_PRIO_NONE); /* Initialize the driver state data */ @@ -5368,7 +5368,7 @@ static inline void stm32l4_sw_initialize(FAR struct stm32l4_usbhost_s *priv) */ nxsem_init(&chan->waitsem, 0, 0); - nxsem_setprotocol(&chan->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&chan->waitsem, SEM_PRIO_NONE); } } diff --git a/arch/arm/src/stm32l4/stm32l4_qspi.c b/arch/arm/src/stm32l4/stm32l4_qspi.c index 48a1b3dab2..92b88f5812 100644 --- a/arch/arm/src/stm32l4/stm32l4_qspi.c +++ b/arch/arm/src/stm32l4/stm32l4_qspi.c @@ -2540,7 +2540,7 @@ struct qspi_dev_s *stm32l4_qspi_initialize(int intf) */ nxsem_init(&priv->dmawait, 0, 0); - nxsem_setprotocol(&priv->dmawait, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->dmawait, SEM_PRIO_NONE); /* Create a watchdog time to catch DMA timeouts */ @@ -2568,7 +2568,7 @@ struct qspi_dev_s *stm32l4_qspi_initialize(int intf) */ nxsem_init(&priv->op_sem, 0, 0); - nxsem_setprotocol(&priv->op_sem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->op_sem, SEM_PRIO_NONE); #endif /* Perform hardware initialization. Puts the QSPI into an active diff --git a/arch/arm/src/stm32l4/stm32l4_rng.c b/arch/arm/src/stm32l4/stm32l4_rng.c index f20395cc64..f4a4191198 100644 --- a/arch/arm/src/stm32l4/stm32l4_rng.c +++ b/arch/arm/src/stm32l4/stm32l4_rng.c @@ -267,7 +267,7 @@ static ssize_t stm32l4_rngread(struct file *filep, char *buffer, size_t buflen) */ nxsem_init(&g_rngdev.rd_readsem, 0, 0); - nxsem_setprotocol(&g_rngdev.rd_readsem, SEM_PRIO_NONE); + nxsem_set_protocol(&g_rngdev.rd_readsem, SEM_PRIO_NONE); g_rngdev.rd_buflen = buflen; g_rngdev.rd_buf = buffer; diff --git a/arch/arm/src/stm32l4/stm32l4_sdmmc.c b/arch/arm/src/stm32l4/stm32l4_sdmmc.c index d4ca23ccef..ffd30db2bf 100644 --- a/arch/arm/src/stm32l4/stm32l4_sdmmc.c +++ b/arch/arm/src/stm32l4/stm32l4_sdmmc.c @@ -3176,7 +3176,7 @@ FAR struct sdio_dev_s *sdio_initialize(int slotno) * priority inheritance enabled. */ - nxsem_setprotocol(&priv->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->waitsem, SEM_PRIO_NONE); /* Create a watchdog timer */ diff --git a/arch/arm/src/stm32l4/stm32l4_spi.c b/arch/arm/src/stm32l4/stm32l4_spi.c index afa1078c37..39c457660a 100644 --- a/arch/arm/src/stm32l4/stm32l4_spi.c +++ b/arch/arm/src/stm32l4/stm32l4_spi.c @@ -1667,7 +1667,7 @@ static int spi_pm_prepare(FAR struct pm_callback_s *cb, int domain, /* Check if exclusive lock for SPI bus is held. */ - if (nxsem_getvalue(&priv->exclsem, &sval) < 0) + if (nxsem_get_value(&priv->exclsem, &sval) < 0) { DEBUGASSERT(false); return -EINVAL; @@ -1765,8 +1765,8 @@ static void spi_bus_initialize(FAR struct stm32l4_spidev_s *priv) * priority inheritance enabled. */ - nxsem_setprotocol(&priv->rxsem, SEM_PRIO_NONE); - nxsem_setprotocol(&priv->txsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->rxsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->txsem, SEM_PRIO_NONE); /* Get DMA channels. NOTE: stm32l4_dmachannel() will always assign the DMA * channel. If the channel is not available, then stm32l4_dmachannel() diff --git a/arch/arm/src/tiva/common/tiva_hciuart.c b/arch/arm/src/tiva/common/tiva_hciuart.c index f9136d318f..bc552a45c9 100644 --- a/arch/arm/src/tiva/common/tiva_hciuart.c +++ b/arch/arm/src/tiva/common/tiva_hciuart.c @@ -1848,10 +1848,10 @@ void hciuart_initialize(void) /* Initialize signalling semaphores */ nxsem_init(&state->rxwait, 0, 0); - nxsem_setprotocol(&state->rxwait, SEM_PRIO_NONE); + nxsem_set_protocol(&state->rxwait, SEM_PRIO_NONE); nxsem_init(&state->txwait, 0, 0); - nxsem_setprotocol(&state->txwait, SEM_PRIO_NONE); + nxsem_set_protocol(&state->txwait, SEM_PRIO_NONE); /* Attach and enable the HCI UART IRQ */ diff --git a/arch/arm/src/tiva/common/tiva_i2c.c b/arch/arm/src/tiva/common/tiva_i2c.c index 9c184d92c2..2a6ef1e5a2 100644 --- a/arch/arm/src/tiva/common/tiva_i2c.c +++ b/arch/arm/src/tiva/common/tiva_i2c.c @@ -849,7 +849,7 @@ static inline void tiva_i2c_sem_init(struct tiva_i2c_priv_s *priv) */ nxsem_init(&priv->waitsem, 0, 0); - nxsem_setprotocol(&priv->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->waitsem, SEM_PRIO_NONE); #endif } diff --git a/arch/arm/src/tiva/common/tiva_ssi.c b/arch/arm/src/tiva/common/tiva_ssi.c index 10ec6a4384..7b246b3a4f 100644 --- a/arch/arm/src/tiva/common/tiva_ssi.c +++ b/arch/arm/src/tiva/common/tiva_ssi.c @@ -1623,7 +1623,7 @@ FAR struct spi_dev_s *tiva_ssibus_initialize(int port) */ nxsem_init(&priv->xfrsem, 0, 0); - nxsem_setprotocol(&priv->xfrsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->xfrsem, SEM_PRIO_NONE); #endif nxsem_init(&priv->exclsem, 0, 1); diff --git a/arch/arm/src/xmc4/xmc4_spi.c b/arch/arm/src/xmc4/xmc4_spi.c index 7cb082263c..f6efb10b95 100644 --- a/arch/arm/src/xmc4/xmc4_spi.c +++ b/arch/arm/src/xmc4/xmc4_spi.c @@ -2090,7 +2090,7 @@ struct spi_dev_s *xmc4_spibus_initialize(int channel) */ nxsem_init(&spics->dmawait, 0, 0); - nxsem_setprotocol(&spics->dmawait, SEM_PRIO_NONE); + nxsem_set_protocol(&spics->dmawait, SEM_PRIO_NONE); /* Create a watchdog time to catch DMA timeouts */ diff --git a/arch/mips/src/pic32mz/pic32mz_i2c.c b/arch/mips/src/pic32mz/pic32mz_i2c.c index 7ad079348f..d6acf9c343 100644 --- a/arch/mips/src/pic32mz/pic32mz_i2c.c +++ b/arch/mips/src/pic32mz/pic32mz_i2c.c @@ -877,7 +877,7 @@ static inline void pic32mz_i2c_sem_init(FAR struct pic32mz_i2c_priv_s *priv) */ nxsem_init(&priv->sem_isr, 0, 0); - nxsem_setprotocol(&priv->sem_isr, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->sem_isr, SEM_PRIO_NONE); #endif } diff --git a/arch/mips/src/pic32mz/pic32mz_spi.c b/arch/mips/src/pic32mz/pic32mz_spi.c index 35e19544ae..37828fa4eb 100644 --- a/arch/mips/src/pic32mz/pic32mz_spi.c +++ b/arch/mips/src/pic32mz/pic32mz_spi.c @@ -2038,7 +2038,7 @@ FAR struct spi_dev_s *pic32mz_spibus_initialize(int port) */ nxsem_init(&priv->dmawait, 0, 0); - nxsem_setprotocol(&priv->dmawait, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->dmawait, SEM_PRIO_NONE); /* Create a watchdog timer to catch DMA timeouts */ diff --git a/arch/sim/src/sim/up_touchscreen.c b/arch/sim/src/sim/up_touchscreen.c index 7e988507c6..f7c6b00fd5 100644 --- a/arch/sim/src/sim/up_touchscreen.c +++ b/arch/sim/src/sim/up_touchscreen.c @@ -637,7 +637,7 @@ int sim_tsc_initialize(int minor) * priority inheritance enabled. */ - nxsem_setprotocol(&priv->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->waitsem, SEM_PRIO_NONE); priv->minor = minor; diff --git a/boards/arm/cxd56xx/common/src/cxd56_imageproc.c b/boards/arm/cxd56xx/common/src/cxd56_imageproc.c index a1b4ef4da5..faf9fa3d49 100644 --- a/boards/arm/cxd56xx/common/src/cxd56_imageproc.c +++ b/boards/arm/cxd56xx/common/src/cxd56_imageproc.c @@ -388,7 +388,7 @@ void imageproc_initialize(void) nxsem_init(&g_rotexc, 0, 1); nxsem_init(&g_rotwait, 0, 0); nxsem_init(&g_geexc, 0, 1); - nxsem_setprotocol(&g_rotwait, SEM_PRIO_NONE); + nxsem_set_protocol(&g_rotwait, SEM_PRIO_NONE); cxd56_ge2dinitialize(GEDEVNAME); diff --git a/drivers/1wire/1wire.c b/drivers/1wire/1wire.c index f5ecce9b33..52c4fb4a6b 100644 --- a/drivers/1wire/1wire.c +++ b/drivers/1wire/1wire.c @@ -193,7 +193,7 @@ static int onewire_pm_prepare(FAR struct pm_callback_s *cb, int domain, /* Check if exclusive lock for the bus master is held. */ - if (nxsem_getvalue(&master->devsem.sem, &sval) < 0) + if (nxsem_get_value(&master->devsem.sem, &sval) < 0) { DEBUGASSERT(false); return -EINVAL; diff --git a/drivers/analog/adc.c b/drivers/analog/adc.c index 4cbadd3268..a97d01fc46 100644 --- a/drivers/analog/adc.c +++ b/drivers/analog/adc.c @@ -613,7 +613,7 @@ int adc_register(FAR const char *path, FAR struct adc_dev_s *dev) * priority inheritance enabled. */ - nxsem_setprotocol(&dev->ad_recv.af_sem, SEM_PRIO_NONE); + nxsem_set_protocol(&dev->ad_recv.af_sem, SEM_PRIO_NONE); /* Reset the ADC hardware */ diff --git a/drivers/analog/comp.c b/drivers/analog/comp.c index 5d723ed18b..61e6701ee5 100644 --- a/drivers/analog/comp.c +++ b/drivers/analog/comp.c @@ -411,10 +411,10 @@ int comp_register(FAR const char *path, FAR struct comp_dev_s *dev) /* Initialize semaphores */ nxsem_init(&dev->ad_sem, 0, 1); - nxsem_setprotocol(&dev->ad_sem, SEM_PRIO_NONE); + nxsem_set_protocol(&dev->ad_sem, SEM_PRIO_NONE); nxsem_init(&dev->ad_readsem, 0, 0); - nxsem_setprotocol(&dev->ad_readsem, SEM_PRIO_NONE); + nxsem_set_protocol(&dev->ad_readsem, SEM_PRIO_NONE); /* Bind the upper-half callbacks to the lower half COMP driver */ diff --git a/drivers/analog/dac.c b/drivers/analog/dac.c index b5e6dd65ef..908ebfee09 100644 --- a/drivers/analog/dac.c +++ b/drivers/analog/dac.c @@ -489,7 +489,7 @@ int dac_txdone(FAR struct dac_dev_s *dev) { /* Inform any waiting threads that new xmit space is available */ - ret = nxsem_getvalue(&dev->ad_xmit.af_sem, &sval); + ret = nxsem_get_value(&dev->ad_xmit.af_sem, &sval); if (ret == OK && sval <= 0) { ret = nxsem_post(&dev->ad_xmit.af_sem); @@ -515,7 +515,7 @@ int dac_register(FAR const char *path, FAR struct dac_dev_s *dev) * priority inheritance enabled. */ - nxsem_setprotocol(&dev->ad_xmit.af_sem, SEM_PRIO_NONE); + nxsem_set_protocol(&dev->ad_xmit.af_sem, SEM_PRIO_NONE); dev->ad_ops->ao_reset(dev); diff --git a/drivers/can/can.c b/drivers/can/can.c index a361d635e3..334ba7c0d1 100644 --- a/drivers/can/can.c +++ b/drivers/can/can.c @@ -1202,7 +1202,7 @@ int can_register(FAR const char *path, FAR struct can_dev_s *dev) */ nxsem_init(&dev->cd_rtr[i].cr_sem, 0, 0); - nxsem_setprotocol(&dev->cd_rtr[i].cr_sem, SEM_PRIO_NONE); + nxsem_set_protocol(&dev->cd_rtr[i].cr_sem, SEM_PRIO_NONE); dev->cd_rtr[i].cr_msg = NULL; } @@ -1341,7 +1341,7 @@ int can_receive(FAR struct can_dev_s *dev, FAR struct can_hdr_s *hdr, */ sval = 0; - if (nxsem_getvalue(&fifo->rx_sem, &sval) <= 0) + if (nxsem_get_value(&fifo->rx_sem, &sval) <= 0) { can_givesem(&fifo->rx_sem); } diff --git a/drivers/input/ads7843e.c b/drivers/input/ads7843e.c index f04ab4778d..95ccc485a5 100644 --- a/drivers/input/ads7843e.c +++ b/drivers/input/ads7843e.c @@ -1182,7 +1182,7 @@ int ads7843e_register(FAR struct spi_dev_s *spi, * have priority inheritance enabled. */ - nxsem_setprotocol(&priv->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->waitsem, SEM_PRIO_NONE); /* Make sure that interrupts are disabled */ diff --git a/drivers/input/ft5x06.c b/drivers/input/ft5x06.c index fac5d8968a..4bf192edce 100644 --- a/drivers/input/ft5x06.c +++ b/drivers/input/ft5x06.c @@ -1169,7 +1169,7 @@ int ft5x06_register(FAR struct i2c_master_s *i2c, * have priority inheritance enabled. */ - nxsem_setprotocol(&priv->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->waitsem, SEM_PRIO_NONE); #ifdef CONFIG_FT5X06_POLLMODE /* Allocate a timer for polling the FT5x06 */ diff --git a/drivers/input/max11802.c b/drivers/input/max11802.c index 53a45ec770..2a53ce697c 100644 --- a/drivers/input/max11802.c +++ b/drivers/input/max11802.c @@ -1174,7 +1174,7 @@ int max11802_register(FAR struct spi_dev_s *spi, * have priority inheritance enabled. */ - nxsem_setprotocol(&priv->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->waitsem, SEM_PRIO_NONE); /* Make sure that interrupts are disabled */ diff --git a/drivers/input/mxt.c b/drivers/input/mxt.c index 2ae333795f..6d9affb396 100644 --- a/drivers/input/mxt.c +++ b/drivers/input/mxt.c @@ -1884,7 +1884,7 @@ int mxt_register(FAR struct i2c_master_s *i2c, * have priority inheritance enabled. */ - nxsem_setprotocol(&priv->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->waitsem, SEM_PRIO_NONE); /* Make sure that interrupts are disabled */ diff --git a/drivers/input/tsc2007.c b/drivers/input/tsc2007.c index 7fdd472a76..ac052699a2 100644 --- a/drivers/input/tsc2007.c +++ b/drivers/input/tsc2007.c @@ -1233,7 +1233,7 @@ int tsc2007_register(FAR struct i2c_master_s *dev, * have priority inheritance enabled. */ - nxsem_setprotocol(&priv->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->waitsem, SEM_PRIO_NONE); /* Make sure that interrupts are disabled */ diff --git a/drivers/modem/altair/altmdm_sys.c b/drivers/modem/altair/altmdm_sys.c index fb973c934d..90f7988fd9 100644 --- a/drivers/modem/altair/altmdm_sys.c +++ b/drivers/modem/altair/altmdm_sys.c @@ -321,12 +321,12 @@ int altmdm_sys_getcsemvalue(FAR struct altmdm_sys_csem_s *handle, return ERROR; } - ret = nxsem_getvalue(&handle->sem, value); + ret = nxsem_get_value(&handle->sem, value); #ifdef CONFIG_MODEM_ALTMDM_DEBUG if (ret < 0) { - m_err("nxsem_getvalue() failed:%d\n", ret); + m_err("nxsem_get_value() failed:%d\n", ret); } #endif diff --git a/drivers/net/rpmsgdrv.c b/drivers/net/rpmsgdrv.c index 5644f70943..3bf5d58038 100644 --- a/drivers/net/rpmsgdrv.c +++ b/drivers/net/rpmsgdrv.c @@ -755,7 +755,7 @@ static int net_rpmsg_drv_send_recv(FAR struct net_driver_s *dev, int ret; nxsem_init(&cookie.sem, 0, 0); - nxsem_setprotocol(&cookie.sem, SEM_PRIO_NONE); + nxsem_set_protocol(&cookie.sem, SEM_PRIO_NONE); cookie.header = header; header->command = command; diff --git a/drivers/net/slip.c b/drivers/net/slip.c index b06ebf04d7..36cd74fce6 100644 --- a/drivers/net/slip.c +++ b/drivers/net/slip.c @@ -1001,7 +1001,7 @@ int slip_initialize(int intf, FAR const char *devname) /* Initialize the wait semaphore */ nxsem_init(&priv->waitsem, 0, 0); - nxsem_setprotocol(&priv->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->waitsem, SEM_PRIO_NONE); /* Start the SLIP receiver kernel thread */ diff --git a/drivers/net/telnet.c b/drivers/net/telnet.c index 268f8748ac..33ebb2115e 100644 --- a/drivers/net/telnet.c +++ b/drivers/net/telnet.c @@ -1012,7 +1012,7 @@ static int telnet_session(FAR struct telnet_session_s *session) * priority inheritance. */ - nxsem_setprotocol(&priv->td_iosem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->td_iosem, SEM_PRIO_NONE); priv->td_state = STATE_NORMAL; priv->td_crefs = 0; @@ -1112,7 +1112,7 @@ static int telnet_session(FAR struct telnet_session_s *session) * priority inheritance. */ - nxsem_setprotocol(&g_iosem, SEM_PRIO_NONE); + nxsem_set_protocol(&g_iosem, SEM_PRIO_NONE); /* Start the I/O thread */ diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 9d198f1e45..bfc23896bc 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -1102,8 +1102,8 @@ static int tun_dev_init(FAR struct tun_device_s *priv, * priority inheritance enabled. */ - nxsem_setprotocol(&priv->read_wait_sem, SEM_PRIO_NONE); - nxsem_setprotocol(&priv->write_wait_sem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->read_wait_sem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->write_wait_sem, SEM_PRIO_NONE); /* Create a watchdog for timing polling for and timing of transmissions */ diff --git a/drivers/pipes/pipe_common.c b/drivers/pipes/pipe_common.c index cfefc4b8a5..6f98f75c98 100644 --- a/drivers/pipes/pipe_common.c +++ b/drivers/pipes/pipe_common.c @@ -144,8 +144,8 @@ FAR struct pipe_dev_s *pipecommon_allocdev(size_t bufsize) * should not have priority inheritance enabled. */ - nxsem_setprotocol(&dev->d_rdsem, SEM_PRIO_NONE); - nxsem_setprotocol(&dev->d_wrsem, SEM_PRIO_NONE); + nxsem_set_protocol(&dev->d_rdsem, SEM_PRIO_NONE); + nxsem_set_protocol(&dev->d_wrsem, SEM_PRIO_NONE); dev->d_bufsize = bufsize; } @@ -218,7 +218,7 @@ int pipecommon_open(FAR struct file *filep) if (dev->d_nwriters == 1) { - while (nxsem_getvalue(&dev->d_rdsem, &sval) == 0 && sval < 0) + while (nxsem_get_value(&dev->d_rdsem, &sval) == 0 && sval < 0) { nxsem_post(&dev->d_rdsem); } @@ -318,7 +318,7 @@ int pipecommon_close(FAR struct file *filep) if (--dev->d_nwriters <= 0) { - while (nxsem_getvalue(&dev->d_rdsem, &sval) == 0 && sval < 0) + while (nxsem_get_value(&dev->d_rdsem, &sval) == 0 && sval < 0) { nxsem_post(&dev->d_rdsem); } @@ -471,7 +471,7 @@ ssize_t pipecommon_read(FAR struct file *filep, FAR char *buffer, size_t len) /* Notify all waiting writers that bytes have been removed from the buffer */ - while (nxsem_getvalue(&dev->d_wrsem, &sval) == 0 && sval < 0) + while (nxsem_get_value(&dev->d_wrsem, &sval) == 0 && sval < 0) { nxsem_post(&dev->d_wrsem); } @@ -577,7 +577,7 @@ ssize_t pipecommon_write(FAR struct file *filep, FAR const char *buffer, { /* Yes.. Notify all of the waiting readers that more data is available */ - while (nxsem_getvalue(&dev->d_rdsem, &sval) == 0 && sval < 0) + while (nxsem_get_value(&dev->d_rdsem, &sval) == 0 && sval < 0) { nxsem_post(&dev->d_rdsem); } @@ -600,7 +600,7 @@ ssize_t pipecommon_write(FAR struct file *filep, FAR const char *buffer, { /* Yes.. Notify all of the waiting readers that more data is available */ - while (nxsem_getvalue(&dev->d_rdsem, &sval) == 0 && sval < 0) + while (nxsem_get_value(&dev->d_rdsem, &sval) == 0 && sval < 0) { nxsem_post(&dev->d_rdsem); } diff --git a/drivers/sensors/hc_sr04.c b/drivers/sensors/hc_sr04.c index d598529adf..2f4737ef8d 100644 --- a/drivers/sensors/hc_sr04.c +++ b/drivers/sensors/hc_sr04.c @@ -116,7 +116,7 @@ static int hcsr04_read_distance(FAR struct hcsr04_dev_s *priv) { int done; - nxsem_getvalue(&priv->conv_donesem, &done); + nxsem_get_value(&priv->conv_donesem, &done); if (done == 0) { @@ -279,7 +279,7 @@ static bool hcsr04_sample(FAR struct hcsr04_dev_s *priv) { int done; - nxsem_getvalue(&priv->conv_donesem, &done); + nxsem_get_value(&priv->conv_donesem, &done); return (done == 0); } diff --git a/drivers/sensors/lis3dh.c b/drivers/sensors/lis3dh.c index 0862bb19ae..c8be9e7b3e 100644 --- a/drivers/sensors/lis3dh.c +++ b/drivers/sensors/lis3dh.c @@ -1003,7 +1003,7 @@ int lis3dh_register(FAR const char *devpath, FAR struct spi_dev_s *spi, /* Initialize read notification semaphore */ nxsem_init(&priv->readsem, 0, 0); - nxsem_setprotocol(&priv->readsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->readsem, SEM_PRIO_NONE); /* Setup SPI frequency and mode */ diff --git a/drivers/serial/pty.c b/drivers/serial/pty.c index 429d5b3993..5e69e6d993 100644 --- a/drivers/serial/pty.c +++ b/drivers/serial/pty.c @@ -795,7 +795,7 @@ static int pty_ioctl(FAR struct file *filep, int cmd, unsigned long arg) do { - DEBUGVERIFY(nxsem_getvalue(&devpair->pp_slavesem, &sval)); + DEBUGVERIFY(nxsem_get_value(&devpair->pp_slavesem, &sval)); if (sval < 0) { nxsem_post(&devpair->pp_slavesem); @@ -1102,7 +1102,7 @@ int pty_register(int minor) * have priority inheritance enabled. */ - nxsem_setprotocol(&devpair->pp_slavesem, SEM_PRIO_NONE); + nxsem_set_protocol(&devpair->pp_slavesem, SEM_PRIO_NONE); #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS devpair->pp_minor = minor; diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c index 5f9a413f28..892dd3a8c7 100644 --- a/drivers/serial/serial.c +++ b/drivers/serial/serial.c @@ -171,7 +171,7 @@ static void uart_pollnotify(FAR uart_dev_t *dev, pollevent_t eventset) */ flags = enter_critical_section(); - nxsem_getvalue(fds->sem, &semcount); + nxsem_get_value(fds->sem, &semcount); if (semcount < 1) { nxsem_post(fds->sem); @@ -1628,8 +1628,8 @@ int uart_register(FAR const char *path, FAR uart_dev_t *dev) * priority inheritance enabled. */ - nxsem_setprotocol(&dev->xmitsem, SEM_PRIO_NONE); - nxsem_setprotocol(&dev->recvsem, SEM_PRIO_NONE); + nxsem_set_protocol(&dev->xmitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&dev->recvsem, SEM_PRIO_NONE); /* Register the serial driver */ diff --git a/drivers/syslog/ramlog.c b/drivers/syslog/ramlog.c index 7823d4596d..75601f3485 100644 --- a/drivers/syslog/ramlog.c +++ b/drivers/syslog/ramlog.c @@ -671,7 +671,7 @@ int ramlog_register(FAR const char *devpath, FAR char *buffer, size_t buflen) * not have priority inheritance enabled. */ - nxsem_setprotocol(&priv->rl_waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->rl_waitsem, SEM_PRIO_NONE); #endif priv->rl_bufsize = buflen; diff --git a/drivers/timers/pwm.c b/drivers/timers/pwm.c index d7533f1016..b298490ed0 100644 --- a/drivers/timers/pwm.c +++ b/drivers/timers/pwm.c @@ -600,7 +600,7 @@ int pwm_register(FAR const char *path, FAR struct pwm_lowerhalf_s *dev) * priority inheritance enabled. */ - nxsem_setprotocol(&upper->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&upper->waitsem, SEM_PRIO_NONE); #endif upper->dev = dev; diff --git a/drivers/timers/rpmsg_rtc.c b/drivers/timers/rpmsg_rtc.c index 324815a479..014894e0a1 100644 --- a/drivers/timers/rpmsg_rtc.c +++ b/drivers/timers/rpmsg_rtc.c @@ -252,7 +252,7 @@ static int rpmsg_rtc_send_recv(FAR struct rpmsg_rtc_lowerhalf_s *lower, int ret; nxsem_init(&cookie.sem, 0, 0); - nxsem_setprotocol(&cookie.sem, SEM_PRIO_NONE); + nxsem_set_protocol(&cookie.sem, SEM_PRIO_NONE); cookie.msg = msg; msg->command = command; diff --git a/drivers/usbdev/usbmsc.c b/drivers/usbdev/usbmsc.c index b183cc0980..6454e0c18b 100644 --- a/drivers/usbdev/usbmsc.c +++ b/drivers/usbdev/usbmsc.c @@ -1334,8 +1334,8 @@ int usbmsc_configure(unsigned int nluns, void **handle) * should not have priority inheritance enabled. */ - nxsem_setprotocol(&priv->thsynch, SEM_PRIO_NONE); - nxsem_setprotocol(&priv->thwaitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->thsynch, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->thwaitsem, SEM_PRIO_NONE); sq_init(&priv->wrreqlist); priv->nluns = nluns; diff --git a/drivers/usbhost/usbhost_hidkbd.c b/drivers/usbhost/usbhost_hidkbd.c index fa9f60b4d1..aa6cf90802 100644 --- a/drivers/usbhost/usbhost_hidkbd.c +++ b/drivers/usbhost/usbhost_hidkbd.c @@ -1996,7 +1996,7 @@ static FAR struct usbhost_class_s * * not have priority inheritance enabled. */ - nxsem_setprotocol(&priv->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->waitsem, SEM_PRIO_NONE); /* Return the instance of the USB keyboard class driver */ @@ -2582,7 +2582,7 @@ int usbhost_kbdinit(void) * have priority inheritance enabled. */ - nxsem_setprotocol(&g_syncsem, SEM_PRIO_NONE); + nxsem_set_protocol(&g_syncsem, SEM_PRIO_NONE); /* Advertise our availability to support (certain) devices */ diff --git a/drivers/usbhost/usbhost_hidmouse.c b/drivers/usbhost/usbhost_hidmouse.c index b98e96c58c..4aba01958d 100644 --- a/drivers/usbhost/usbhost_hidmouse.c +++ b/drivers/usbhost/usbhost_hidmouse.c @@ -1960,7 +1960,7 @@ static FAR struct usbhost_class_s * * not have priority inheritance enabled. */ - nxsem_setprotocol(&priv->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->waitsem, SEM_PRIO_NONE); /* Return the instance of the USB mouse class driver */ @@ -2608,7 +2608,7 @@ int usbhost_mouse_init(void) * have priority inheritance enabled. */ - nxsem_setprotocol(&g_syncsem, SEM_PRIO_NONE); + nxsem_set_protocol(&g_syncsem, SEM_PRIO_NONE); /* Advertise our availability to support (certain) mouse devices */ diff --git a/drivers/usbhost/usbhost_max3421e.c b/drivers/usbhost/usbhost_max3421e.c index 468fd67a02..3166db61f7 100644 --- a/drivers/usbhost/usbhost_max3421e.c +++ b/drivers/usbhost/usbhost_max3421e.c @@ -4788,8 +4788,8 @@ static inline int max3421e_sw_initialize(FAR struct max3421e_usbhost_s *priv, * priority inheritance enabled. */ - nxsem_setprotocol(&priv->pscsem, SEM_PRIO_NONE); - nxsem_setprotocol(&priv->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->pscsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->waitsem, SEM_PRIO_NONE); /* Initialize the driver state data */ diff --git a/drivers/usbhost/usbhost_xboxcontroller.c b/drivers/usbhost/usbhost_xboxcontroller.c index 7f7b082d93..ce4cc1fdf5 100644 --- a/drivers/usbhost/usbhost_xboxcontroller.c +++ b/drivers/usbhost/usbhost_xboxcontroller.c @@ -1662,7 +1662,7 @@ static FAR struct usbhost_class_s * * not have priority inheritance enabled. */ - nxsem_setprotocol(&priv->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->waitsem, SEM_PRIO_NONE); /* Return the instance of the USB class driver */ @@ -2321,7 +2321,7 @@ int usbhost_xboxcontroller_init(void) * have priority inheritance enabled. */ - nxsem_setprotocol(&g_syncsem, SEM_PRIO_NONE); + nxsem_set_protocol(&g_syncsem, SEM_PRIO_NONE); /* Advertise our availability to support (certain) devices */ diff --git a/drivers/video/video.c b/drivers/video/video.c index c53d6d668f..d5f319a20e 100644 --- a/drivers/video/video.c +++ b/drivers/video/video.c @@ -448,7 +448,7 @@ static bool is_sem_waited(FAR sem_t *sem) int ret; int semcount; - ret = nxsem_getvalue(sem, &semcount); + ret = nxsem_get_value(sem, &semcount); if ((ret == OK) && (semcount < 0)) { return true; diff --git a/drivers/wireless/bluetooth/bt_uart_bcm4343x.c b/drivers/wireless/bluetooth/bt_uart_bcm4343x.c index 609298fe06..fb110f423e 100644 --- a/drivers/wireless/bluetooth/bt_uart_bcm4343x.c +++ b/drivers/wireless/bluetooth/bt_uart_bcm4343x.c @@ -308,7 +308,7 @@ static int load_bcm4343x_firmware(FAR const struct btuart_lowerhalf_s *lower) lower->rxenable(lower, true); nxsem_init(&rxsem, 0, 0); - nxsem_setprotocol(&rxsem, SEM_PRIO_NONE); + nxsem_set_protocol(&rxsem, SEM_PRIO_NONE); /* It is possible this could fail if modem is already at high speed, so we * can safely ignore error return value. diff --git a/drivers/wireless/bluetooth/bt_uart_shim.c b/drivers/wireless/bluetooth/bt_uart_shim.c index a3a666ae6d..a8e14cda94 100644 --- a/drivers/wireless/bluetooth/bt_uart_shim.c +++ b/drivers/wireless/bluetooth/bt_uart_shim.c @@ -462,7 +462,7 @@ FAR void *bt_uart_shim_getdevice(FAR char *path) /* Put materials into poll structure */ - nxsem_setprotocol(&s->dready, SEM_PRIO_NONE); + nxsem_set_protocol(&s->dready, SEM_PRIO_NONE); s->p.fd = s->h; s->p.events = POLLIN; diff --git a/drivers/wireless/ieee80211/bcm43xxx/bcmf_driver.c b/drivers/wireless/ieee80211/bcm43xxx/bcmf_driver.c index 97f2c19871..b96922ac67 100644 --- a/drivers/wireless/ieee80211/bcm43xxx/bcmf_driver.c +++ b/drivers/wireless/ieee80211/bcm43xxx/bcmf_driver.c @@ -198,7 +198,7 @@ FAR struct bcmf_dev_s *bcmf_allocate_device(void) goto exit_free_priv; } - if ((ret = nxsem_setprotocol(&priv->control_timeout, SEM_PRIO_NONE)) != OK) + if ((ret = nxsem_set_protocol(&priv->control_timeout, SEM_PRIO_NONE)) != OK) { goto exit_free_priv; } @@ -210,7 +210,7 @@ FAR struct bcmf_dev_s *bcmf_allocate_device(void) goto exit_free_priv; } - if ((ret = nxsem_setprotocol(&priv->auth_signal, SEM_PRIO_NONE)) != OK) + if ((ret = nxsem_set_protocol(&priv->auth_signal, SEM_PRIO_NONE)) != OK) { goto exit_free_priv; } diff --git a/drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.c b/drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.c index c763ce1de9..df9ba5dc5e 100644 --- a/drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.c +++ b/drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.c @@ -690,7 +690,7 @@ int bcmf_bus_sdio_initialize(FAR struct bcmf_dev_s *priv, goto exit_free_bus; } - if ((ret = nxsem_setprotocol(&sbus->thread_signal, SEM_PRIO_NONE)) != OK) + if ((ret = nxsem_set_protocol(&sbus->thread_signal, SEM_PRIO_NONE)) != OK) { goto exit_free_bus; } diff --git a/drivers/wireless/ieee802154/xbee/xbee.c b/drivers/wireless/ieee802154/xbee/xbee.c index 6729720221..cef7f3ac37 100644 --- a/drivers/wireless/ieee802154/xbee/xbee.c +++ b/drivers/wireless/ieee802154/xbee/xbee.c @@ -1235,7 +1235,7 @@ XBEEHANDLE xbee_init(FAR struct spi_dev_s *spi, nxsem_init(&priv->atquery_sem, 0, 1); nxsem_init(&priv->tx_sem, 0, 1); nxsem_init(&priv->txdone_sem, 0, 0); - nxsem_setprotocol(&priv->txdone_sem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->txdone_sem, SEM_PRIO_NONE); ieee802154_primitivepool_initialize(); @@ -1527,7 +1527,7 @@ int xbee_atquery(FAR struct xbee_priv_s *priv, FAR const char *atcommand) */ nxsem_init(&priv->atresp_sem, 0, 0); - nxsem_setprotocol(&priv->atresp_sem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->atresp_sem, SEM_PRIO_NONE); do { diff --git a/drivers/wireless/ieee802154/xbee/xbee_netdev.c b/drivers/wireless/ieee802154/xbee/xbee_netdev.c index 3c6f0adf0e..1f00c033e6 100644 --- a/drivers/wireless/ieee802154/xbee/xbee_netdev.c +++ b/drivers/wireless/ieee802154/xbee/xbee_netdev.c @@ -1379,7 +1379,7 @@ int xbee_netdev_register(XBEEHANDLE xbee) priv->xd_eventpending = false; nxsem_init(&priv->xd_eventsem, 0, 0); - nxsem_setprotocol(&priv->xd_eventsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->xd_eventsem, SEM_PRIO_NONE); sq_init(&priv->primitive_queue); diff --git a/drivers/wireless/nrf24l01.c b/drivers/wireless/nrf24l01.c index 65442b3756..d54da38c2f 100644 --- a/drivers/wireless/nrf24l01.c +++ b/drivers/wireless/nrf24l01.c @@ -1058,7 +1058,7 @@ static ssize_t nrf24l01_read(FAR struct file *filep, FAR char *buffer, /* Test if data is ready */ - ret = nxsem_getvalue(&dev->sem_rx, &packet_count); + ret = nxsem_get_value(&dev->sem_rx, &packet_count); if (ret) { goto errout; /* getvalue failed */ @@ -1498,7 +1498,7 @@ int nrf24l01_register(FAR struct spi_dev_s *spi, nxsem_init(&(dev->devsem), 0, 1); nxsem_init(&dev->sem_tx, 0, 0); - nxsem_setprotocol(&dev->sem_tx, SEM_PRIO_NONE); + nxsem_set_protocol(&dev->sem_tx, SEM_PRIO_NONE); #ifdef CONFIG_WL_NRF24L01_RXSUPPORT if ((rx_fifo = kmm_malloc(CONFIG_WL_NRF24L01_RXFIFO_LEN)) == NULL) @@ -1511,7 +1511,7 @@ int nrf24l01_register(FAR struct spi_dev_s *spi, nxsem_init(&(dev->sem_fifo), 0, 1); nxsem_init(&(dev->sem_rx), 0, 0); - nxsem_setprotocol(&dev->sem_rx, SEM_PRIO_NONE); + nxsem_set_protocol(&dev->sem_rx, SEM_PRIO_NONE); #endif /* Configure IRQ pin (falling edge) */ diff --git a/fs/aio/aio_initialize.c b/fs/aio/aio_initialize.c index deebb812f8..3fa99627b1 100644 --- a/fs/aio/aio_initialize.c +++ b/fs/aio/aio_initialize.c @@ -95,7 +95,7 @@ void aio_initialize(void) /* Initialize counting semaphores */ nxsem_init(&g_aioc_freesem, 0, CONFIG_FS_NAIOC); - nxsem_setprotocol(&g_aioc_freesem, SEM_PRIO_NONE); + nxsem_set_protocol(&g_aioc_freesem, SEM_PRIO_NONE); nxsem_init(&g_aio_exclsem, 0, 1); g_aio_holder = INVALID_PROCESS_ID; diff --git a/fs/hostfs/hostfs_rpmsg.c b/fs/hostfs/hostfs_rpmsg.c index 5855f4e690..b23970f954 100644 --- a/fs/hostfs/hostfs_rpmsg.c +++ b/fs/hostfs/hostfs_rpmsg.c @@ -304,7 +304,7 @@ static int hostfs_rpmsg_send_recv(uint32_t command, bool copy, memset(&cookie, 0, sizeof(cookie)); nxsem_init(&cookie.sem, 0, 0); - nxsem_setprotocol(&cookie.sem, SEM_PRIO_NONE); + nxsem_set_protocol(&cookie.sem, SEM_PRIO_NONE); if (data) { diff --git a/fs/vfs/fs_poll.c b/fs/vfs/fs_poll.c index 0ccc1966d1..7e3afe4813 100644 --- a/fs/vfs/fs_poll.c +++ b/fs/vfs/fs_poll.c @@ -426,7 +426,7 @@ int nx_poll(FAR struct pollfd *fds, unsigned int nfds, int timeout) */ nxsem_init(&sem, 0, 0); - nxsem_setprotocol(&sem, SEM_PRIO_NONE); + nxsem_set_protocol(&sem, SEM_PRIO_NONE); ret = poll_setup(fds, nfds, &sem); if (ret >= 0) diff --git a/graphics/nxterm/nxterm_register.c b/graphics/nxterm/nxterm_register.c index 507ebff0ab..49b749e4b9 100644 --- a/graphics/nxterm/nxterm_register.c +++ b/graphics/nxterm/nxterm_register.c @@ -99,7 +99,7 @@ FAR struct nxterm_state_s * */ nxsem_init(&priv->waitsem, 0, 0); - nxsem_setprotocol(&priv->waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->waitsem, SEM_PRIO_NONE); #endif /* Connect to the font cache for the configured font characteristics */ diff --git a/include/nuttx/mutex.h b/include/nuttx/mutex.h index d5796200a1..f23bf0c816 100644 --- a/include/nuttx/mutex.h +++ b/include/nuttx/mutex.h @@ -187,7 +187,7 @@ static inline bool nxmutex_is_locked(FAR mutex_t *mutex) int cnt; int ret; - ret = nxsem_getvalue(mutex, &cnt); + ret = nxsem_get_value(mutex, &cnt); DEBUGASSERT(ret == OK); diff --git a/include/nuttx/semaphore.h b/include/nuttx/semaphore.h index ff73e425a1..70b76e4e76 100644 --- a/include/nuttx/semaphore.h +++ b/include/nuttx/semaphore.h @@ -66,9 +66,9 @@ # define _SEM_TRYWAIT(s) nxsem_trywait(s) # define _SEM_TIMEDWAIT(s,t) nxsem_timedwait(s,t) # define _SEM_POST(s) nxsem_post(s) -# define _SEM_GETVALUE(s) nxsem_getvalue(s) -# define _SEM_GETPROTOCOL(s,p) nxsem_getprotocol(s,p) -# define _SEM_SETPROTOCOL(s,p) nxsem_setprotocol(s,p) +# define _SEM_GETVALUE(s) nxsem_get_value(s) +# define _SEM_GETPROTOCOL(s,p) nxsem_get_protocol(s,p) +# define _SEM_SETPROTOCOL(s,p) nxsem_set_protocol(s,p) # define _SEM_ERRNO(r) (-(r)) # define _SEM_ERRVAL(r) (r) #else @@ -342,7 +342,7 @@ int nxsem_tickwait(FAR sem_t *sem, clock_t start, uint32_t delay); int nxsem_post(FAR sem_t *sem); /**************************************************************************** - * Name: nxsem_getvalue + * Name: nxsem_get_value * * Description: * This function updates the location referenced by 'sval' argument to @@ -352,7 +352,7 @@ int nxsem_post(FAR sem_t *sem); * but may not reflect the actual value of the semaphore when it is * returned to the calling task. * - * If 'sem' is locked, the value return by nxsem_getvalue() will either be + * If 'sem' is locked, the value return by nxsem_get_value() will either be * zero or a negative number whose absolute value represents the number * of tasks waiting for the semaphore. * @@ -367,7 +367,7 @@ int nxsem_post(FAR sem_t *sem); * ****************************************************************************/ -int nxsem_getvalue(FAR sem_t *sem, FAR int *sval); +int nxsem_get_value(FAR sem_t *sem, FAR int *sval); /**************************************************************************** * Name: nxsem_reset @@ -392,7 +392,7 @@ int nxsem_getvalue(FAR sem_t *sem, FAR int *sval); int nxsem_reset(FAR sem_t *sem, int16_t count); /**************************************************************************** - * Name: nxsem_getprotocol + * Name: nxsem_get_protocol * * Description: * Return the value of the semaphore protocol attribute. @@ -410,7 +410,7 @@ int nxsem_reset(FAR sem_t *sem, int16_t count); * ****************************************************************************/ -#define nxsem_getprotocol(s,p) sem_getprotocol(s,p) +#define nxsem_get_protocol(s,p) sem_getprotocol(s,p) /**************************************************************************** * Name: sem_getprotocol @@ -434,7 +434,7 @@ int nxsem_reset(FAR sem_t *sem, int16_t count); int sem_getprotocol(FAR sem_t *sem, FAR int *protocol); /**************************************************************************** - * Name: nxsem_setprotocol + * Name: nxsem_set_protocol * * Description: * Set semaphore protocol attribute. @@ -454,7 +454,7 @@ int sem_getprotocol(FAR sem_t *sem, FAR int *protocol); * becomes *permanently* a holder of the semaphore and may have its * priority boosted when any other task tries to acquire the semaphore. * - * The fix is to call nxsem_setprotocol(SEM_PRIO_NONE) immediately after + * The fix is to call nxsem_set_protocol(SEM_PRIO_NONE) immediately after * the sem_init() call so that there will be no priority inheritance * operations on this semaphore. * @@ -470,7 +470,7 @@ int sem_getprotocol(FAR sem_t *sem, FAR int *protocol); * ****************************************************************************/ -int nxsem_setprotocol(FAR sem_t *sem, int protocol); +int nxsem_set_protocol(FAR sem_t *sem, int protocol); /**************************************************************************** * Name: sem_setprotocol diff --git a/libs/libc/semaphore/sem_getvalue.c b/libs/libc/semaphore/sem_getvalue.c index 41503a33a9..1f2799efac 100644 --- a/libs/libc/semaphore/sem_getvalue.c +++ b/libs/libc/semaphore/sem_getvalue.c @@ -49,7 +49,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: nxsem_getvalue + * Name: nxsem_get_value * * Description: * This function updates the location referenced by 'sval' argument to @@ -59,7 +59,7 @@ * but may not reflect the actual value of the semaphore when it is * returned to the calling task. * - * If 'sem' is locked, the value return by nxsem_getvalue() will either be + * If 'sem' is locked, the value return by nxsem_get_value() will either be * zero or a negative number whose absolute value represents the number * of tasks waiting for the semaphore. * @@ -74,7 +74,7 @@ * ****************************************************************************/ -int nxsem_getvalue(FAR sem_t *sem, FAR int *sval) +int nxsem_get_value(FAR sem_t *sem, FAR int *sval) { if (sem != NULL && sval != NULL) { @@ -113,7 +113,7 @@ int sem_getvalue(FAR sem_t *sem, FAR int *sval) { int ret; - ret = nxsem_getvalue(sem, sval); + ret = nxsem_get_value(sem, sval); if (ret < 0) { set_errno(-ret); diff --git a/libs/libc/semaphore/sem_setprotocol.c b/libs/libc/semaphore/sem_setprotocol.c index 2347a1bb8d..01c0ddc3dd 100644 --- a/libs/libc/semaphore/sem_setprotocol.c +++ b/libs/libc/semaphore/sem_setprotocol.c @@ -51,7 +51,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: nxsem_setprotocol + * Name: nxsem_set_protocol * * Description: * Set semaphore protocol attribute. @@ -71,7 +71,7 @@ * becomes *permanently* a holder of the semaphore and may have its * priority boosted when any other task tries to acquire the semaphore. * - * The fix is to call nxsem_setprotocol(SEM_PRIO_NONE) immediately after + * The fix is to call nxsem_set_protocol(SEM_PRIO_NONE) immediately after * the sem_init() call so that there will be no priority inheritance * operations on this semaphore. * @@ -87,7 +87,7 @@ * ****************************************************************************/ -int nxsem_setprotocol(FAR sem_t *sem, int protocol) +int nxsem_set_protocol(FAR sem_t *sem, int protocol) { DEBUGASSERT(sem != NULL); @@ -149,7 +149,7 @@ int sem_setprotocol(FAR sem_t *sem, int protocol) { int ret; - ret = nxsem_setprotocol(sem, protocol); + ret = nxsem_set_protocol(sem, protocol); if (ret < 0) { set_errno(-ret); diff --git a/mm/iob/iob_navail.c b/mm/iob/iob_navail.c index 959cc05fe9..5d44b7ed4c 100644 --- a/mm/iob/iob_navail.c +++ b/mm/iob/iob_navail.c @@ -65,7 +65,7 @@ int iob_navail(bool throttled) #if CONFIG_IOB_NBUFFERS > 0 /* Get the value of the IOB counting semaphores */ - ret = nxsem_getvalue(&g_iob_sem, &navail); + ret = nxsem_get_value(&g_iob_sem, &navail); if (ret >= 0) { ret = navail; @@ -108,7 +108,7 @@ int iob_qentry_navail(void) #if CONFIG_IOB_NCHAINS > 0 /* Get the value of the IOB chain qentry counting semaphores */ - ret = nxsem_getvalue(&g_qentry_sem, &navail); + ret = nxsem_get_value(&g_qentry_sem, &navail); if (ret >= 0) { ret = navail; diff --git a/net/arp/arp_notify.c b/net/arp/arp_notify.c index 4bba3b45ee..c16cbfa7db 100644 --- a/net/arp/arp_notify.c +++ b/net/arp/arp_notify.c @@ -77,7 +77,7 @@ void arp_wait_setup(in_addr_t ipaddr, FAR struct arp_notify_s *notify) */ nxsem_init(¬ify->nt_sem, 0, 0); - nxsem_setprotocol(¬ify->nt_sem, SEM_PRIO_NONE); + nxsem_set_protocol(¬ify->nt_sem, SEM_PRIO_NONE); /* Add the wait structure to the list with interrupts disabled */ diff --git a/net/arp/arp_send.c b/net/arp/arp_send.c index c52c38ac8c..5f4d27a875 100644 --- a/net/arp/arp_send.c +++ b/net/arp/arp_send.c @@ -297,7 +297,7 @@ int arp_send(in_addr_t ipaddr) */ nxsem_init(&state.snd_sem, 0, 0); /* Doesn't really fail */ - nxsem_setprotocol(&state.snd_sem, SEM_PRIO_NONE); + nxsem_set_protocol(&state.snd_sem, SEM_PRIO_NONE); state.snd_retries = 0; /* No retries yet */ state.snd_ipaddr = ipaddr; /* IP address to query */ diff --git a/net/bluetooth/bluetooth_recvfrom.c b/net/bluetooth/bluetooth_recvfrom.c index 9aa03cf353..702c140043 100644 --- a/net/bluetooth/bluetooth_recvfrom.c +++ b/net/bluetooth/bluetooth_recvfrom.c @@ -384,7 +384,7 @@ ssize_t bluetooth_recvfrom(FAR struct socket *psock, FAR void *buf, */ nxsem_init(&state.ir_sem, 0, 0); /* Doesn't really fail */ - nxsem_setprotocol(&state.ir_sem, SEM_PRIO_NONE); + nxsem_set_protocol(&state.ir_sem, SEM_PRIO_NONE); /* Set up the callback in the connection */ diff --git a/net/bluetooth/bluetooth_sendto.c b/net/bluetooth/bluetooth_sendto.c index 6f939e268c..24578cdb5a 100644 --- a/net/bluetooth/bluetooth_sendto.c +++ b/net/bluetooth/bluetooth_sendto.c @@ -296,7 +296,7 @@ ssize_t psock_bluetooth_sendto(FAR struct socket *psock, FAR const void *buf, */ nxsem_init(&state.is_sem, 0, 0); /* Doesn't really fail */ - nxsem_setprotocol(&state.is_sem, SEM_PRIO_NONE); + nxsem_set_protocol(&state.is_sem, SEM_PRIO_NONE); state.is_sock = psock; /* Socket descriptor to use */ state.is_buflen = len; /* Number of bytes to send */ diff --git a/net/icmp/icmp_recvfrom.c b/net/icmp/icmp_recvfrom.c index 5f46e5aadd..4f23985e61 100644 --- a/net/icmp/icmp_recvfrom.c +++ b/net/icmp/icmp_recvfrom.c @@ -418,7 +418,7 @@ ssize_t icmp_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len, */ nxsem_init(&state.recv_sem, 0, 0); - nxsem_setprotocol(&state.recv_sem, SEM_PRIO_NONE); + nxsem_set_protocol(&state.recv_sem, SEM_PRIO_NONE); state.recv_sock = psock; /* The IPPROTO_ICMP socket instance */ state.recv_result = -ENOMEM; /* Assume allocation failure */ diff --git a/net/icmp/icmp_sendto.c b/net/icmp/icmp_sendto.c index 500bfdcf1a..cb172be1df 100644 --- a/net/icmp/icmp_sendto.c +++ b/net/icmp/icmp_sendto.c @@ -365,7 +365,7 @@ ssize_t icmp_sendto(FAR struct socket *psock, FAR const void *buf, size_t len, */ nxsem_init(&state.snd_sem, 0, 0); - nxsem_setprotocol(&state.snd_sem, SEM_PRIO_NONE); + nxsem_set_protocol(&state.snd_sem, SEM_PRIO_NONE); state.snd_result = -ENOMEM; /* Assume allocation failure */ state.snd_toaddr = inaddr->sin_addr.s_addr; /* Address of the peer to send the request */ diff --git a/net/icmpv6/icmpv6_autoconfig.c b/net/icmpv6/icmpv6_autoconfig.c index 8a45757d0f..e2fced5253 100644 --- a/net/icmpv6/icmpv6_autoconfig.c +++ b/net/icmpv6/icmpv6_autoconfig.c @@ -200,7 +200,7 @@ static int icmpv6_send_message(FAR struct net_driver_s *dev, bool advertise) */ nxsem_init(&state.snd_sem, 0, 0); /* Doesn't really fail */ - nxsem_setprotocol(&state.snd_sem, SEM_PRIO_NONE); + nxsem_set_protocol(&state.snd_sem, SEM_PRIO_NONE); /* Remember the routing device name */ diff --git a/net/icmpv6/icmpv6_neighbor.c b/net/icmpv6/icmpv6_neighbor.c index a57d7a1754..6f679586a0 100644 --- a/net/icmpv6/icmpv6_neighbor.c +++ b/net/icmpv6/icmpv6_neighbor.c @@ -269,7 +269,7 @@ int icmpv6_neighbor(const net_ipv6addr_t ipaddr) */ nxsem_init(&state.snd_sem, 0, 0); /* Doesn't really fail */ - nxsem_setprotocol(&state.snd_sem, SEM_PRIO_NONE); + nxsem_set_protocol(&state.snd_sem, SEM_PRIO_NONE); state.snd_retries = 0; /* No retries yet */ net_ipv6addr_copy(state.snd_ipaddr, lookup); /* IP address to query */ diff --git a/net/icmpv6/icmpv6_notify.c b/net/icmpv6/icmpv6_notify.c index d38d039510..d599186905 100644 --- a/net/icmpv6/icmpv6_notify.c +++ b/net/icmpv6/icmpv6_notify.c @@ -90,7 +90,7 @@ void icmpv6_wait_setup(const net_ipv6addr_t ipaddr, */ nxsem_init(¬ify->nt_sem, 0, 0); - nxsem_setprotocol(¬ify->nt_sem, SEM_PRIO_NONE); + nxsem_set_protocol(¬ify->nt_sem, SEM_PRIO_NONE); /* Add the wait structure to the list with interrupts disabled */ diff --git a/net/icmpv6/icmpv6_recvfrom.c b/net/icmpv6/icmpv6_recvfrom.c index 71511f2002..a19aac124f 100644 --- a/net/icmpv6/icmpv6_recvfrom.c +++ b/net/icmpv6/icmpv6_recvfrom.c @@ -425,7 +425,7 @@ ssize_t icmpv6_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len, */ nxsem_init(&state.recv_sem, 0, 0); - nxsem_setprotocol(&state.recv_sem, SEM_PRIO_NONE); + nxsem_set_protocol(&state.recv_sem, SEM_PRIO_NONE); state.recv_sock = psock; /* The IPPROTO_ICMP6 socket instance */ state.recv_result = -ENOMEM; /* Assume allocation failure */ diff --git a/net/icmpv6/icmpv6_rnotify.c b/net/icmpv6/icmpv6_rnotify.c index 8a9d1caf59..95f217d0bd 100644 --- a/net/icmpv6/icmpv6_rnotify.c +++ b/net/icmpv6/icmpv6_rnotify.c @@ -172,7 +172,7 @@ void icmpv6_rwait_setup(FAR struct net_driver_s *dev, */ nxsem_init(¬ify->rn_sem, 0, 0); - nxsem_setprotocol(¬ify->rn_sem, SEM_PRIO_NONE); + nxsem_set_protocol(¬ify->rn_sem, SEM_PRIO_NONE); /* Add the wait structure to the list with interrupts disabled */ diff --git a/net/icmpv6/icmpv6_sendto.c b/net/icmpv6/icmpv6_sendto.c index 89e3d5fa7b..833821fae0 100644 --- a/net/icmpv6/icmpv6_sendto.c +++ b/net/icmpv6/icmpv6_sendto.c @@ -356,7 +356,7 @@ ssize_t icmpv6_sendto(FAR struct socket *psock, FAR const void *buf, size_t len, */ nxsem_init(&state.snd_sem, 0, 0); - nxsem_setprotocol(&state.snd_sem, SEM_PRIO_NONE); + nxsem_set_protocol(&state.snd_sem, SEM_PRIO_NONE); state.snd_result = -ENOMEM; /* Assume allocation failure */ state.snd_buf = buf; /* ICMPv6 header + data payload */ diff --git a/net/ieee802154/ieee802154_recvfrom.c b/net/ieee802154/ieee802154_recvfrom.c index c075afef64..691c0f63a2 100644 --- a/net/ieee802154/ieee802154_recvfrom.c +++ b/net/ieee802154/ieee802154_recvfrom.c @@ -382,7 +382,7 @@ ssize_t ieee802154_recvfrom(FAR struct socket *psock, FAR void *buf, */ nxsem_init(&state.ir_sem, 0, 0); /* Doesn't really fail */ - nxsem_setprotocol(&state.ir_sem, SEM_PRIO_NONE); + nxsem_set_protocol(&state.ir_sem, SEM_PRIO_NONE); /* Set up the callback in the connection */ diff --git a/net/ieee802154/ieee802154_sendto.c b/net/ieee802154/ieee802154_sendto.c index f05c11daef..41d74212a2 100644 --- a/net/ieee802154/ieee802154_sendto.c +++ b/net/ieee802154/ieee802154_sendto.c @@ -485,7 +485,7 @@ ssize_t psock_ieee802154_sendto(FAR struct socket *psock, FAR const void *buf, */ nxsem_init(&state.is_sem, 0, 0); /* Doesn't really fail */ - nxsem_setprotocol(&state.is_sem, SEM_PRIO_NONE); + nxsem_set_protocol(&state.is_sem, SEM_PRIO_NONE); state.is_sock = psock; /* Socket descriptor to use */ state.is_buflen = len; /* Number of bytes to send */ diff --git a/net/igmp/igmp_group.c b/net/igmp/igmp_group.c index 18dfe4bb18..158cee1e02 100644 --- a/net/igmp/igmp_group.c +++ b/net/igmp/igmp_group.c @@ -124,7 +124,7 @@ FAR struct igmp_group_s *igmp_grpalloc(FAR struct net_driver_s *dev, */ nxsem_init(&group->sem, 0, 0); - nxsem_setprotocol(&group->sem, SEM_PRIO_NONE); + nxsem_set_protocol(&group->sem, SEM_PRIO_NONE); /* Initialize the group timer (but don't start it yet) */ diff --git a/net/local/local_conn.c b/net/local/local_conn.c index d4c506d4cc..7f3d9bf5d5 100644 --- a/net/local/local_conn.c +++ b/net/local/local_conn.c @@ -98,7 +98,7 @@ FAR struct local_conn_s *local_alloc(void) */ nxsem_init(&conn->lc_waitsem, 0, 0); - nxsem_setprotocol(&conn->lc_waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&conn->lc_waitsem, SEM_PRIO_NONE); #endif } diff --git a/net/local/local_connect.c b/net/local/local_connect.c index 1ad4c298ed..d4a83e3bc9 100644 --- a/net/local/local_connect.c +++ b/net/local/local_connect.c @@ -179,7 +179,7 @@ static int inline local_stream_connect(FAR struct local_conn_s *client, client->lc_state = LOCAL_STATE_ACCEPT; local_accept_pollnotify(server, POLLIN); - if (nxsem_getvalue(&server->lc_waitsem, &sval) >= 0 && sval < 1) + if (nxsem_get_value(&server->lc_waitsem, &sval) >= 0 && sval < 1) { _local_semgive(&server->lc_waitsem); } diff --git a/net/mld/mld_group.c b/net/mld/mld_group.c index 3266e94a5b..88c648499b 100644 --- a/net/mld/mld_group.c +++ b/net/mld/mld_group.c @@ -131,7 +131,7 @@ FAR struct mld_group_s *mld_grpalloc(FAR struct net_driver_s *dev, */ nxsem_init(&group->sem, 0, 0); - nxsem_setprotocol(&group->sem, SEM_PRIO_NONE); + nxsem_set_protocol(&group->sem, SEM_PRIO_NONE); /* Initialize the group timers */ diff --git a/net/netlink/netlink_conn.c b/net/netlink/netlink_conn.c index 96aed71bd2..2261cf5492 100644 --- a/net/netlink/netlink_conn.c +++ b/net/netlink/netlink_conn.c @@ -435,7 +435,7 @@ netlink_get_response(FAR struct netlink_conn_s *conn) /* Set up a semaphore to notify us when a response is queued. */ sem_init(&waitsem, 0, 0); - nxsem_setprotocol(&waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&waitsem, SEM_PRIO_NONE); /* Set up a notifier to post the semaphore when a response is * received. diff --git a/net/pkt/pkt_recvfrom.c b/net/pkt/pkt_recvfrom.c index bf93de339c..4f23e312b3 100644 --- a/net/pkt/pkt_recvfrom.c +++ b/net/pkt/pkt_recvfrom.c @@ -265,7 +265,7 @@ static void pkt_recvfrom_initialize(FAR struct socket *psock, FAR void *buf, */ nxsem_init(&pstate->pr_sem, 0, 0); /* Doesn't really fail */ - nxsem_setprotocol(&pstate->pr_sem, SEM_PRIO_NONE); + nxsem_set_protocol(&pstate->pr_sem, SEM_PRIO_NONE); pstate->pr_buflen = len; pstate->pr_buffer = buf; diff --git a/net/pkt/pkt_send.c b/net/pkt/pkt_send.c index b876a89ff4..2e66ecc03b 100644 --- a/net/pkt/pkt_send.c +++ b/net/pkt/pkt_send.c @@ -204,7 +204,7 @@ ssize_t psock_pkt_send(FAR struct socket *psock, FAR const void *buf, */ nxsem_init(&state.snd_sem, 0, 0); /* Doesn't really fail */ - nxsem_setprotocol(&state.snd_sem, SEM_PRIO_NONE); + nxsem_set_protocol(&state.snd_sem, SEM_PRIO_NONE); state.snd_sock = psock; /* Socket descriptor to use */ state.snd_buflen = len; /* Number of bytes to send */ diff --git a/net/sixlowpan/sixlowpan_send.c b/net/sixlowpan/sixlowpan_send.c index cbb5ef32f6..cc68ce6672 100644 --- a/net/sixlowpan/sixlowpan_send.c +++ b/net/sixlowpan/sixlowpan_send.c @@ -214,7 +214,7 @@ int sixlowpan_send(FAR struct net_driver_s *dev, /* Initialize the send state structure */ nxsem_init(&sinfo.s_waitsem, 0, 0); - nxsem_setprotocol(&sinfo.s_waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&sinfo.s_waitsem, SEM_PRIO_NONE); sinfo.s_result = -EBUSY; sinfo.s_ipv6hdr = ipv6hdr; diff --git a/net/sixlowpan/sixlowpan_tcpsend.c b/net/sixlowpan/sixlowpan_tcpsend.c index 4dbff19ca1..28d20f9fd5 100644 --- a/net/sixlowpan/sixlowpan_tcpsend.c +++ b/net/sixlowpan/sixlowpan_tcpsend.c @@ -611,7 +611,7 @@ static int sixlowpan_send_packet(FAR struct socket *psock, /* Initialize the send state structure */ nxsem_init(&sinfo.s_waitsem, 0, 0); - nxsem_setprotocol(&sinfo.s_waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&sinfo.s_waitsem, SEM_PRIO_NONE); sinfo.s_sock = psock; sinfo.s_result = -EBUSY; diff --git a/net/tcp/tcp_accept.c b/net/tcp/tcp_accept.c index c3c4426d7f..f7e8447198 100644 --- a/net/tcp/tcp_accept.c +++ b/net/tcp/tcp_accept.c @@ -282,7 +282,7 @@ int psock_tcp_accept(FAR struct socket *psock, FAR struct sockaddr *addr, */ nxsem_init(&state.acpt_sem, 0, 0); - nxsem_setprotocol(&state.acpt_sem, SEM_PRIO_NONE); + nxsem_set_protocol(&state.acpt_sem, SEM_PRIO_NONE); /* Set up the callback in the connection */ diff --git a/net/tcp/tcp_close.c b/net/tcp/tcp_close.c index d2956031fd..2d57588fb3 100644 --- a/net/tcp/tcp_close.c +++ b/net/tcp/tcp_close.c @@ -325,7 +325,7 @@ static inline int tcp_close_disconnect(FAR struct socket *psock) */ nxsem_init(&state.cl_sem, 0, 0); - nxsem_setprotocol(&state.cl_sem, SEM_PRIO_NONE); + nxsem_set_protocol(&state.cl_sem, SEM_PRIO_NONE); /* Notify the device driver of the availability of TX data */ diff --git a/net/tcp/tcp_connect.c b/net/tcp/tcp_connect.c index 1a8c4e77d3..08fe885429 100644 --- a/net/tcp/tcp_connect.c +++ b/net/tcp/tcp_connect.c @@ -107,7 +107,7 @@ static inline int psock_setup_callbacks(FAR struct socket *psock, */ nxsem_init(&pstate->tc_sem, 0, 0); /* Doesn't really fail */ - nxsem_setprotocol(&pstate->tc_sem, SEM_PRIO_NONE); + nxsem_set_protocol(&pstate->tc_sem, SEM_PRIO_NONE); pstate->tc_conn = conn; pstate->tc_psock = psock; diff --git a/net/tcp/tcp_recvfrom.c b/net/tcp/tcp_recvfrom.c index d8f2302040..a354c3fb0d 100644 --- a/net/tcp/tcp_recvfrom.c +++ b/net/tcp/tcp_recvfrom.c @@ -557,7 +557,7 @@ static void tcp_recvfrom_initialize(FAR struct socket *psock, FAR void *buf, */ nxsem_init(&pstate->ir_sem, 0, 0); /* Doesn't really fail */ - nxsem_setprotocol(&pstate->ir_sem, SEM_PRIO_NONE); + nxsem_set_protocol(&pstate->ir_sem, SEM_PRIO_NONE); pstate->ir_buflen = len; pstate->ir_buffer = buf; diff --git a/net/tcp/tcp_send_unbuffered.c b/net/tcp/tcp_send_unbuffered.c index aebeecb34e..a17a6571c1 100644 --- a/net/tcp/tcp_send_unbuffered.c +++ b/net/tcp/tcp_send_unbuffered.c @@ -660,7 +660,7 @@ ssize_t psock_tcp_send(FAR struct socket *psock, */ nxsem_init(&state.snd_sem, 0, 0); /* Doesn't really fail */ - nxsem_setprotocol(&state.snd_sem, SEM_PRIO_NONE); + nxsem_set_protocol(&state.snd_sem, SEM_PRIO_NONE); state.snd_sock = psock; /* Socket descriptor to use */ state.snd_buflen = len; /* Number of bytes to send */ diff --git a/net/tcp/tcp_sendfile.c b/net/tcp/tcp_sendfile.c index cba883f1a8..a488dc7ab3 100644 --- a/net/tcp/tcp_sendfile.c +++ b/net/tcp/tcp_sendfile.c @@ -510,7 +510,7 @@ ssize_t tcp_sendfile(FAR struct socket *psock, FAR struct file *infile, */ nxsem_init(&state.snd_sem, 0, 0); /* Doesn't really fail */ - nxsem_setprotocol(&state.snd_sem, SEM_PRIO_NONE); + nxsem_set_protocol(&state.snd_sem, SEM_PRIO_NONE); state.snd_sock = psock; /* Socket descriptor to use */ state.snd_foffset = offset ? *offset : 0; /* Input file offset */ diff --git a/net/tcp/tcp_txdrain.c b/net/tcp/tcp_txdrain.c index d5ff3b2adb..4993df828f 100644 --- a/net/tcp/tcp_txdrain.c +++ b/net/tcp/tcp_txdrain.c @@ -113,7 +113,7 @@ int tcp_txdrain(FAR struct socket *psock, unsigned int timeout) /* Initialize the wait semaphore */ nxsem_init(&waitsem, 0, 0); - nxsem_setprotocol(&waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&waitsem, SEM_PRIO_NONE); /* The following needs to be done with the network stable */ diff --git a/net/tcp/tcp_wrbuffer.c b/net/tcp/tcp_wrbuffer.c index cd7c6062d7..82df41dc4b 100644 --- a/net/tcp/tcp_wrbuffer.c +++ b/net/tcp/tcp_wrbuffer.c @@ -119,7 +119,7 @@ void tcp_wrbuffer_initialize(void) } nxsem_init(&g_wrbuffer.sem, 0, CONFIG_NET_TCP_NWRBCHAINS); - nxsem_setprotocol(&g_wrbuffer.sem, SEM_PRIO_NONE); + nxsem_set_protocol(&g_wrbuffer.sem, SEM_PRIO_NONE); } /**************************************************************************** @@ -282,7 +282,7 @@ int tcp_wrbuffer_test(void) int val = 0; int ret; - ret = nxsem_getvalue(&g_wrbuffer.sem, &val); + ret = nxsem_get_value(&g_wrbuffer.sem, &val); if (ret >= 0) { ret = val > 0 ? OK : -ENOSPC; diff --git a/net/udp/udp_recvfrom.c b/net/udp/udp_recvfrom.c index 2c19970d39..51201cff2c 100644 --- a/net/udp/udp_recvfrom.c +++ b/net/udp/udp_recvfrom.c @@ -523,7 +523,7 @@ static void udp_recvfrom_initialize(FAR struct socket *psock, FAR void *buf, */ nxsem_init(&pstate->ir_sem, 0, 0); /* Doesn't really fail */ - nxsem_setprotocol(&pstate->ir_sem, SEM_PRIO_NONE); + nxsem_set_protocol(&pstate->ir_sem, SEM_PRIO_NONE); pstate->ir_buflen = len; pstate->ir_buffer = buf; diff --git a/net/udp/udp_sendto_unbuffered.c b/net/udp/udp_sendto_unbuffered.c index a7141551bf..946b5a6b4f 100644 --- a/net/udp/udp_sendto_unbuffered.c +++ b/net/udp/udp_sendto_unbuffered.c @@ -414,7 +414,7 @@ ssize_t psock_udp_sendto(FAR struct socket *psock, FAR const void *buf, */ nxsem_init(&state.st_sem, 0, 0); - nxsem_setprotocol(&state.st_sem, SEM_PRIO_NONE); + nxsem_set_protocol(&state.st_sem, SEM_PRIO_NONE); state.st_buflen = len; state.st_buffer = buf; diff --git a/net/udp/udp_txdrain.c b/net/udp/udp_txdrain.c index d425397dfb..01b12bb017 100644 --- a/net/udp/udp_txdrain.c +++ b/net/udp/udp_txdrain.c @@ -113,7 +113,7 @@ int udp_txdrain(FAR struct socket *psock, unsigned int timeout) /* Initialize the wait semaphore */ nxsem_init(&waitsem, 0, 0); - nxsem_setprotocol(&waitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&waitsem, SEM_PRIO_NONE); /* The following needs to be done with the network stable */ diff --git a/net/udp/udp_wrbuffer.c b/net/udp/udp_wrbuffer.c index 3738fd5368..2a34d14ba9 100644 --- a/net/udp/udp_wrbuffer.c +++ b/net/udp/udp_wrbuffer.c @@ -116,7 +116,7 @@ void udp_wrbuffer_initialize(void) } nxsem_init(&g_wrbuffer.sem, 0, CONFIG_NET_UDP_NWRBCHAINS); - nxsem_setprotocol(&g_wrbuffer.sem, SEM_PRIO_NONE); + nxsem_set_protocol(&g_wrbuffer.sem, SEM_PRIO_NONE); } /**************************************************************************** @@ -269,7 +269,7 @@ void udp_wrbuffer_release(FAR struct udp_wrbuffer_s *wrb) int udp_wrbuffer_test(void) { int val = 0; - nxsem_getvalue(&g_wrbuffer.sem, &val); + nxsem_get_value(&g_wrbuffer.sem, &val); return val > 0 ? OK : -ENOSPC; } diff --git a/net/usrsock/usrsock_conn.c b/net/usrsock/usrsock_conn.c index a9f0907aae..9f86887490 100644 --- a/net/usrsock/usrsock_conn.c +++ b/net/usrsock/usrsock_conn.c @@ -247,7 +247,7 @@ int usrsock_setup_request_callback(FAR struct usrsock_conn_s *conn, int ret = -EBUSY; nxsem_init(&pstate->recvsem, 0, 0); - nxsem_setprotocol(&pstate->recvsem, SEM_PRIO_NONE); + nxsem_set_protocol(&pstate->recvsem, SEM_PRIO_NONE); pstate->conn = conn; pstate->result = -EAGAIN; diff --git a/net/usrsock/usrsock_dev.c b/net/usrsock/usrsock_dev.c index f07aceff22..14644c6822 100644 --- a/net/usrsock/usrsock_dev.c +++ b/net/usrsock/usrsock_dev.c @@ -1265,7 +1265,7 @@ void usrsockdev_register(void) nxsem_init(&g_usrsockdev.devsem, 0, 1); nxsem_init(&g_usrsockdev.req.sem, 0, 1); nxsem_init(&g_usrsockdev.req.acksem, 0, 0); - nxsem_setprotocol(&g_usrsockdev.req.acksem, SEM_PRIO_NONE); + nxsem_set_protocol(&g_usrsockdev.req.acksem, SEM_PRIO_NONE); register_driver("/dev/usrsock", &g_usrsockdevops, 0666, &g_usrsockdev); diff --git a/sched/Kconfig b/sched/Kconfig index 69d3beb68f..931e233864 100644 --- a/sched/Kconfig +++ b/sched/Kconfig @@ -1126,7 +1126,7 @@ menuconfig PRIORITY_INHERITANCE int ret = sem_setprotocol(&sem, SEM_PRIO_NONE); From applications, the functionally equivalent OS internal interface, - nxsem_setprotocol(), should be used within the OS + nxsem_set_protocol(), should be used within the OS And for individual pthread mutexes by setting the protocol attribute before initializing the mutex: diff --git a/sched/group/group_create.c b/sched/group/group_create.c index fcc1068078..33d925a861 100644 --- a/sched/group/group_create.c +++ b/sched/group/group_create.c @@ -297,7 +297,7 @@ int group_allocate(FAR struct task_tcb_s *tcb, uint8_t ttype) */ nxsem_init(&group->tg_exitsem, 0, 0); - nxsem_setprotocol(&group->tg_exitsem, SEM_PRIO_NONE); + nxsem_set_protocol(&group->tg_exitsem, SEM_PRIO_NONE); #endif return OK; diff --git a/sched/pthread/pthread_completejoin.c b/sched/pthread/pthread_completejoin.c index 79851ae9ec..7bb4138aa1 100644 --- a/sched/pthread/pthread_completejoin.c +++ b/sched/pthread/pthread_completejoin.c @@ -72,7 +72,7 @@ static bool pthread_notifywaiters(FAR struct join_s *pjoin) /* Are any tasks waiting for our exit value? */ - status = nxsem_getvalue(&pjoin->exit_sem, &ntasks_waiting); + status = nxsem_get_value(&pjoin->exit_sem, &ntasks_waiting); if (status == OK && ntasks_waiting < 0) { /* Set the data semaphore so that this thread will be @@ -90,7 +90,7 @@ static bool pthread_notifywaiters(FAR struct join_s *pjoin) status = pthread_sem_give(&pjoin->exit_sem); if (status == OK) { - status = nxsem_getvalue(&pjoin->exit_sem, &ntasks_waiting); + status = nxsem_get_value(&pjoin->exit_sem, &ntasks_waiting); } } while (ntasks_waiting < 0 && status == OK); diff --git a/sched/pthread/pthread_condbroadcast.c b/sched/pthread/pthread_condbroadcast.c index 0e7e1d53f5..0d5499bca5 100644 --- a/sched/pthread/pthread_condbroadcast.c +++ b/sched/pthread/pthread_condbroadcast.c @@ -88,7 +88,7 @@ int pthread_cond_broadcast(FAR pthread_cond_t *cond) /* Get the current value of the semaphore */ - if (nxsem_getvalue((FAR sem_t *)&cond->sem, &sval) != OK) + if (nxsem_get_value((FAR sem_t *)&cond->sem, &sval) != OK) { ret = EINVAL; } diff --git a/sched/pthread/pthread_condsignal.c b/sched/pthread/pthread_condsignal.c index 9a72d6c4a6..bd1d190a0f 100644 --- a/sched/pthread/pthread_condsignal.c +++ b/sched/pthread/pthread_condsignal.c @@ -80,7 +80,7 @@ int pthread_cond_signal(FAR pthread_cond_t *cond) { /* Get the current value of the semaphore */ - if (nxsem_getvalue((FAR sem_t *)&cond->sem, &sval) != OK) + if (nxsem_get_value((FAR sem_t *)&cond->sem, &sval) != OK) { ret = EINVAL; } diff --git a/sched/pthread/pthread_create.c b/sched/pthread/pthread_create.c index 00ccd307e2..774c44ea2a 100644 --- a/sched/pthread/pthread_create.c +++ b/sched/pthread/pthread_create.c @@ -511,11 +511,11 @@ int pthread_create(FAR pthread_t *thread, FAR const pthread_attr_t *attr, if (ret == OK) { - ret = nxsem_setprotocol(&pjoin->data_sem, SEM_PRIO_NONE); + ret = nxsem_set_protocol(&pjoin->data_sem, SEM_PRIO_NONE); if (ret == OK) { - ret = nxsem_setprotocol(&pjoin->exit_sem, SEM_PRIO_NONE); + ret = nxsem_set_protocol(&pjoin->exit_sem, SEM_PRIO_NONE); } if (ret < 0) diff --git a/sched/pthread/pthread_mutexinit.c b/sched/pthread/pthread_mutexinit.c index 3c4d6c99a0..84d6c1e4f4 100644 --- a/sched/pthread/pthread_mutexinit.c +++ b/sched/pthread/pthread_mutexinit.c @@ -127,7 +127,7 @@ int pthread_mutex_init(FAR pthread_mutex_t *mutex, #ifdef CONFIG_PRIORITY_INHERITANCE /* Initialize the semaphore protocol */ - status = nxsem_setprotocol((FAR sem_t *)&mutex->sem, proto); + status = nxsem_set_protocol((FAR sem_t *)&mutex->sem, proto); if (status < 0) { ret = -status; diff --git a/sched/semaphore/sem_post.c b/sched/semaphore/sem_post.c index 5794155899..e9f69dfe1a 100644 --- a/sched/semaphore/sem_post.c +++ b/sched/semaphore/sem_post.c @@ -105,7 +105,7 @@ int nxsem_post(FAR sem_t *sem) * not possible to know which thread/holder should be released. * * For this reason, it is recommended that priority inheritance be - * disabled via nxsem_setprotocol(SEM_PRIO_NONE) when the semaphore is + * disabled via nxsem_set_protocol(SEM_PRIO_NONE) when the semaphore is * initialized if the semaphore is to used for signaling purposes. */ diff --git a/sched/semaphore/sem_setprotocol.c b/sched/semaphore/sem_setprotocol.c index b999e2c639..11102dc5e2 100644 --- a/sched/semaphore/sem_setprotocol.c +++ b/sched/semaphore/sem_setprotocol.c @@ -51,7 +51,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: nxsem_setprotocol + * Name: nxsem_set_protocol * * Description: * Set semaphore protocol attribute. @@ -71,7 +71,7 @@ * becomes *permanently* a holder of the semaphore and may have its * priority boosted when any other task tries to acquire the semaphore. * - * The fix is to call nxsem_setprotocol(SEM_PRIO_NONE) immediately after + * The fix is to call nxsem_set_protocol(SEM_PRIO_NONE) immediately after * the sem_init() call so that there will be no priority inheritance * operations on this semaphore. * @@ -87,7 +87,7 @@ * ****************************************************************************/ -int nxsem_setprotocol(FAR sem_t *sem, int protocol) +int nxsem_set_protocol(FAR sem_t *sem, int protocol) { DEBUGASSERT(sem != NULL); @@ -165,7 +165,7 @@ int sem_setprotocol(FAR sem_t *sem, int protocol) { int ret; - ret = nxsem_setprotocol(sem, protocol); + ret = nxsem_set_protocol(sem, protocol); if (ret < 0) { set_errno(-ret); diff --git a/wireless/bluetooth/bt_hcicore.c b/wireless/bluetooth/bt_hcicore.c index 8cc51e7894..a828e46a4a 100644 --- a/wireless/bluetooth/bt_hcicore.c +++ b/wireless/bluetooth/bt_hcicore.c @@ -1424,7 +1424,7 @@ static void cmd_queue_init(void) UNUSED(ret); nxsem_init(&g_btdev.ncmd_sem, 0, 1); - nxsem_setprotocol(&g_btdev.ncmd_sem, SEM_PRIO_NONE); + nxsem_set_protocol(&g_btdev.ncmd_sem, SEM_PRIO_NONE); g_btdev.ncmd = 1; pid = kthread_create("BT HCI Tx", CONFIG_BLUETOOTH_TXCMD_PRIORITY, @@ -1724,7 +1724,7 @@ int bt_hci_cmd_send_sync(uint16_t opcode, FAR struct bt_buf_s *buf, /* Set up for the wait */ nxsem_init(&sync_sem, 0, 0); - nxsem_setprotocol(&sync_sem, SEM_PRIO_NONE); + nxsem_set_protocol(&sync_sem, SEM_PRIO_NONE); buf->u.hci.sync = &sync_sem; /* Send the frame */ diff --git a/wireless/ieee802154/mac802154_device.c b/wireless/ieee802154/mac802154_device.c index b81ea75a8f..c1e31ec566 100644 --- a/wireless/ieee802154/mac802154_device.c +++ b/wireless/ieee802154/mac802154_device.c @@ -865,14 +865,14 @@ int mac802154dev_register(MACHANDLE mac, int minor) * before blocking */ nxsem_init(&dev->readsem, 0, 0); - nxsem_setprotocol(&dev->readsem, SEM_PRIO_NONE); + nxsem_set_protocol(&dev->readsem, SEM_PRIO_NONE); dev->readpending = false; sq_init(&dev->dataind_queue); dev->geteventpending = false; nxsem_init(&dev->geteventsem, 0, 0); - nxsem_setprotocol(&dev->geteventsem, SEM_PRIO_NONE); + nxsem_set_protocol(&dev->geteventsem, SEM_PRIO_NONE); sq_init(&dev->primitive_queue); diff --git a/wireless/ieee802154/mac802154_netdev.c b/wireless/ieee802154/mac802154_netdev.c index 391687017a..c3e979a55f 100644 --- a/wireless/ieee802154/mac802154_netdev.c +++ b/wireless/ieee802154/mac802154_netdev.c @@ -1397,7 +1397,7 @@ int mac802154netdev_register(MACHANDLE mac) priv->md_eventpending = false; nxsem_init(&priv->md_eventsem, 0, 0); - nxsem_setprotocol(&priv->md_eventsem, SEM_PRIO_NONE); + nxsem_set_protocol(&priv->md_eventsem, SEM_PRIO_NONE); sq_init(&priv->primitive_queue);