From cf56e4113ae0eb7c1998a1dc6ddb1254b04f6fe2 Mon Sep 17 00:00:00 2001 From: zhangyuan21 Date: Fri, 10 Mar 2023 08:20:01 +0800 Subject: [PATCH] arch: remove unnecessary sem_setprotocol code Signed-off-by: zhangyuan21 --- arch/arm/src/s32k1xx/s32k1xx_serial.c | 1 - arch/arm/src/s32k3xx/s32k3xx_serial.c | 1 - arch/arm/src/sama5/sam_flexcom_spi.c | 1 - arch/arm/src/samd5e5/sam_usb.c | 1 - libs/libc/pthread/pthread_barrierinit.c | 1 - libs/libc/pthread/pthread_condinit.c | 6 ------ 6 files changed, 11 deletions(-) diff --git a/arch/arm/src/s32k1xx/s32k1xx_serial.c b/arch/arm/src/s32k1xx/s32k1xx_serial.c index 5a89d0c759..738d4d93a2 100644 --- a/arch/arm/src/s32k1xx/s32k1xx_serial.c +++ b/arch/arm/src/s32k1xx/s32k1xx_serial.c @@ -753,7 +753,6 @@ static int s32k1xx_dma_setup(struct uart_dev_s *dev) } nxsem_init(&priv->txdmasem, 0, 1); - nxsem_set_protocol(&priv->txdmasem, SEM_PRIO_NONE); } /* Enable Tx DMA for the UART */ diff --git a/arch/arm/src/s32k3xx/s32k3xx_serial.c b/arch/arm/src/s32k3xx/s32k3xx_serial.c index 268fc72b30..3768307870 100644 --- a/arch/arm/src/s32k3xx/s32k3xx_serial.c +++ b/arch/arm/src/s32k3xx/s32k3xx_serial.c @@ -2910,7 +2910,6 @@ static int s32k3xx_dma_setup(struct uart_dev_s *dev) } nxsem_init(&priv->txdmasem, 0, 1); - nxsem_set_protocol(&priv->txdmasem, SEM_PRIO_NONE); } /* Enable Tx DMA for the UART */ diff --git a/arch/arm/src/sama5/sam_flexcom_spi.c b/arch/arm/src/sama5/sam_flexcom_spi.c index a5aaa08a87..2c3a2db464 100644 --- a/arch/arm/src/sama5/sam_flexcom_spi.c +++ b/arch/arm/src/sama5/sam_flexcom_spi.c @@ -2098,7 +2098,6 @@ struct spi_dev_s *sam_flex_spibus_initialize(int port) */ nxsem_init(&flex_spics->dmawait, 0, 0); - nxsem_set_protocol(&flex_spics->dmawait, SEM_PRIO_NONE); #endif flex_spi_dumpregs(flex_spi, "After initialization"); diff --git a/arch/arm/src/samd5e5/sam_usb.c b/arch/arm/src/samd5e5/sam_usb.c index 15a2018231..cf1d8ffeb7 100644 --- a/arch/arm/src/samd5e5/sam_usb.c +++ b/arch/arm/src/samd5e5/sam_usb.c @@ -8485,7 +8485,6 @@ static inline void sam_sw_initialize(struct sam_usbhost_s *priv) { priv->pipelist[epno].idx = epno; nxsem_init(&priv->pipelist[epno].waitsem, 0, 0); - sem_setprotocol(&priv->pipelist[epno].waitsem, SEM_PRIO_NONE); sam_putreg8(USBHOST_PSTATUS_PFREEZE, SAM_USBHOST_PSTATUSSET(epno)); diff --git a/libs/libc/pthread/pthread_barrierinit.c b/libs/libc/pthread/pthread_barrierinit.c index db1f6d3d99..86253444b5 100644 --- a/libs/libc/pthread/pthread_barrierinit.c +++ b/libs/libc/pthread/pthread_barrierinit.c @@ -84,7 +84,6 @@ int pthread_barrier_init(FAR pthread_barrier_t *barrier, else { sem_init(&barrier->sem, 0, 0); - sem_setprotocol(&barrier->sem, SEM_PRIO_NONE); barrier->count = count; } diff --git a/libs/libc/pthread/pthread_condinit.c b/libs/libc/pthread/pthread_condinit.c index 83ba8002e2..9a218d1777 100644 --- a/libs/libc/pthread/pthread_condinit.c +++ b/libs/libc/pthread/pthread_condinit.c @@ -71,12 +71,6 @@ int pthread_cond_init(FAR pthread_cond_t *cond, } else { - /* The contained semaphore is used for signaling and, hence, should - * not have priority inheritance enabled. - */ - - sem_setprotocol(&cond->sem, SEM_PRIO_NONE); - cond->clockid = attr ? attr->clockid : CLOCK_REALTIME; }