This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new cf56e4113a arch: remove unnecessary sem_setprotocol code
cf56e4113a is described below

commit cf56e4113ae0eb7c1998a1dc6ddb1254b04f6fe2
Author: zhangyuan21 <[email protected]>
AuthorDate: Fri Mar 10 08:20:01 2023 +0800

    arch: remove unnecessary sem_setprotocol code
    
    Signed-off-by: zhangyuan21 <[email protected]>
---
 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;
     }
 

Reply via email to