Replace #include <semaphore.h> to #include <nuttx/semaphore.h>

Since the kernel side should call nxsem_xxx instead and remove the unused inclusion
This commit is contained in:
Xiang Xiao
2020-02-01 08:27:30 -06:00
committed by Gregory Nutt
parent 95dc647c3c
commit 5c80b94820
566 changed files with 239 additions and 664 deletions
-1
View File
@@ -43,7 +43,6 @@
#include <stdint.h>
#include <stdbool.h>
#include <unistd.h>
#include <semaphore.h>
#include <string.h>
#include <errno.h>
#include <debug.h>
+3 -18
View File
@@ -47,7 +47,6 @@
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include <semaphore.h>
#include <errno.h>
#include <debug.h>
@@ -455,21 +454,7 @@ static inline void am335x_i2c_modifyreg(FAR struct am335x_i2c_priv_s *priv,
static inline void am335x_i2c_sem_wait(FAR struct am335x_i2c_priv_s *priv)
{
int ret;
do
{
/* Take the semaphore (perhaps waiting) */
ret = nxsem_wait(&priv->sem_excl);
/* The only case that an error should occur here is if the wait was
* awakened by a signal.
*/
DEBUGASSERT(ret == OK || ret == -EINTR);
}
while (ret == -EINTR);
nxsem_wait_uninterruptible(&priv->sem_excl);
}
/****************************************************************************
@@ -1226,7 +1211,7 @@ static int am335x_i2c_isr_process(struct am335x_i2c_priv_s *priv)
* and wake it up
*/
sem_post(&priv->sem_isr);
nxsem_post(&priv->sem_isr);
priv->intstate = INTSTATE_DONE;
}
#else
@@ -1261,7 +1246,7 @@ static int am335x_i2c_isr_process(struct am335x_i2c_priv_s *priv)
* and wake it up
*/
sem_post(&priv->sem_isr);
nxsem_post(&priv->sem_isr);
priv->intstate = INTSTATE_DONE;
}
#else
+1 -1
View File
@@ -48,11 +48,11 @@
#include <stdint.h>
#include <string.h>
#include <semaphore.h>
#include <errno.h>
#include <debug.h>
#include <nuttx/arch.h>
#include <nuttx/semaphore.h>
#include <nuttx/video/fb.h>
#include "up_arch.h"
-1
View File
@@ -43,7 +43,6 @@
#include <stdint.h>
#include <stdbool.h>
#include <unistd.h>
#include <semaphore.h>
#include <string.h>
#include <errno.h>
#include <debug.h>
-1
View File
@@ -43,7 +43,6 @@
#include <stdint.h>
#include <stdbool.h>
#include <unistd.h>
#include <semaphore.h>
#include <string.h>
#include <errno.h>
#include <debug.h>
+1 -1
View File
@@ -40,11 +40,11 @@
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <semaphore.h>
#include <debug.h>
#include <nuttx/arch.h>
#include <nuttx/irq.h>
#include <nuttx/semaphore.h>
#include "cxd56_dmac.h"
+1 -1
View File
@@ -36,7 +36,6 @@
#include <nuttx/config.h>
#include <sys/types.h>
#include <semaphore.h>
#include <stdint.h>
#include <string.h>
#include <errno.h>
@@ -45,6 +44,7 @@
#include <nuttx/kmalloc.h>
#include <nuttx/fs/fs.h>
#include <nuttx/irq.h>
#include <nuttx/semaphore.h>
#include <arch/board/board.h>
+2 -1
View File
@@ -42,8 +42,9 @@
#include <nuttx/kmalloc.h>
#include <nuttx/fs/fs.h>
#include <nuttx/irq.h>
#include <nuttx/semaphore.h>
#include <queue.h>
#include <semaphore.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
+2 -1
View File
@@ -42,8 +42,9 @@
#include <nuttx/kmalloc.h>
#include <nuttx/fs/fs.h>
#include <nuttx/irq.h>
#include <nuttx/semaphore.h>
#include <queue.h>
#include <semaphore.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
+1 -1
View File
@@ -40,12 +40,12 @@
#include <nuttx/config.h>
#include <nuttx/kmalloc.h>
#include <nuttx/irq.h>
#include <nuttx/semaphore.h>
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <semaphore.h>
#include <debug.h>
#include <errno.h>
+1 -1
View File
@@ -44,7 +44,6 @@
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
#include <semaphore.h>
#include <string.h>
#include <assert.h>
#include <debug.h>
@@ -59,6 +58,7 @@
#include <nuttx/mmcsd.h>
#include <nuttx/kmalloc.h>
#include <nuttx/irq.h>
#include <nuttx/semaphore.h>
#include <arch/board/board.h>
-1
View File
@@ -45,7 +45,6 @@
#include <stdint.h>
#include <stdbool.h>
#include <unistd.h>
#include <semaphore.h>
#include <string.h>
#include <errno.h>
#include <debug.h>
+1 -1
View File
@@ -37,7 +37,7 @@
#include <nuttx/arch.h>
#include <nuttx/mtd/mtd.h>
#include <semaphore.h>
#include <stdint.h>
#include <string.h>
#include <errno.h>
+2 -1
View File
@@ -42,7 +42,8 @@
#include <nuttx/kmalloc.h>
#include <nuttx/fs/fs.h>
#include <nuttx/irq.h>
#include <semaphore.h>
#include <nuttx/semaphore.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
+3 -3
View File
@@ -43,7 +43,6 @@
#include <sys/types.h>
#include <stdint.h>
#include <stdbool.h>
#include <semaphore.h>
#include <errno.h>
#include <debug.h>
#include <string.h>
@@ -51,6 +50,7 @@
#include <arch/board/board.h>
#include <nuttx/irq.h>
#include <nuttx/arch.h>
#include <nuttx/semaphore.h>
#include <nuttx/spi/spi.h>
#include "up_internal.h"
@@ -1315,7 +1315,7 @@ void cxd56_spi_dmaconfig(int port, int chtype, DMA_HANDLE handle,
if (!priv->dmaenable)
{
sem_init(&priv->dmasem, 0, 0);
nxsem_init(&priv->dmasem, 0, 0);
priv->dmaenable = true;
}
}
@@ -1328,7 +1328,7 @@ void cxd56_spi_dmaconfig(int port, int chtype, DMA_HANDLE handle,
if (!priv->dmaenable)
{
sem_init(&priv->dmasem, 0, 0);
nxsem_init(&priv->dmasem, 0, 0);
priv->dmaenable = true;
}
}
+2 -1
View File
@@ -38,11 +38,12 @@
#include <nuttx/arch.h>
#include <nuttx/fs/fs.h>
#include <nuttx/fs/ioctl.h>
#include <nuttx/semaphore.h>
#include <stdio.h>
#include <string.h>
#include <debug.h>
#include <errno.h>
#include <semaphore.h>
#include "cxd56_icc.h"
#include "cxd56_sysctl.h"
+2 -1
View File
@@ -42,8 +42,9 @@
#include <nuttx/kmalloc.h>
#include <nuttx/fs/fs.h>
#include <nuttx/irq.h>
#include <nuttx/semaphore.h>
#include <queue.h>
#include <semaphore.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
+1 -1
View File
@@ -44,12 +44,12 @@
#include <sys/types.h>
#include <stdint.h>
#include <stdbool.h>
#include <semaphore.h>
#include <assert.h>
#include <errno.h>
#include <nuttx/irq.h>
#include <nuttx/arch.h>
#include <nuttx/semaphore.h>
#include "up_arch.h"
#include "cxd56_clock.h"
-1
View File
@@ -43,7 +43,6 @@
#include <stdint.h>
#include <stdbool.h>
#include <unistd.h>
#include <semaphore.h>
#include <string.h>
#include <errno.h>
#include <debug.h>
-1
View File
@@ -47,7 +47,6 @@
#include <stdbool.h>
#include <unistd.h>
#include <string.h>
#include <semaphore.h>
#include <errno.h>
#include <assert.h>
#include <debug.h>
+1 -1
View File
@@ -42,12 +42,12 @@
#include <sys/types.h>
#include <stdint.h>
#include <stdbool.h>
#include <semaphore.h>
#include <assert.h>
#include <errno.h>
#include <nuttx/irq.h>
#include <nuttx/arch.h>
#include <nuttx/semaphore.h>
#include "up_arch.h"
#include "hardware/efm32_cmu.h"
-1
View File
@@ -65,7 +65,6 @@
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include <semaphore.h>
#include <errno.h>
#include <debug.h>
-1
View File
@@ -43,7 +43,6 @@
#include <stdint.h>
#include <stdbool.h>
#include <unistd.h>
#include <semaphore.h>
#include <string.h>
#include <errno.h>
#include <debug.h>
-1
View File
@@ -43,7 +43,6 @@
#include <stdint.h>
#include <stdbool.h>
#include <unistd.h>
#include <semaphore.h>
#include <string.h>
#include <errno.h>
#include <debug.h>
-1
View File
@@ -44,7 +44,6 @@
#include <sys/types.h>
#include <stdint.h>
#include <stdbool.h>
#include <semaphore.h>
#include <errno.h>
#include <assert.h>
#include <debug.h>
-1
View File
@@ -44,7 +44,6 @@
#include <stdbool.h>
#include <stdlib.h>
#include <unistd.h>
#include <semaphore.h>
#include <string.h>
#include <errno.h>
#include <debug.h>
-1
View File
@@ -43,7 +43,6 @@
#include <stdint.h>
#include <stdbool.h>
#include <unistd.h>
#include <semaphore.h>
#include <string.h>
#include <fixedmath.h>
#include <errno.h>
-1
View File
@@ -41,7 +41,6 @@
#include <sys/types.h>
#include <stdint.h>
#include <semaphore.h>
#include <assert.h>
#include <errno.h>
#include <debug.h>
-1
View File
@@ -46,7 +46,6 @@
#include <sys/types.h>
#include <stdint.h>
#include <semaphore.h>
#include <assert.h>
#include <errno.h>
#include <debug.h>
+1 -1
View File
@@ -43,7 +43,6 @@
#include <stdint.h>
#include <stdbool.h>
#include <unistd.h>
#include <semaphore.h>
#include <string.h>
#include <errno.h>
#include <debug.h>
@@ -52,6 +51,7 @@
#include <nuttx/arch.h>
#include <nuttx/init.h>
#include <nuttx/fs/ioctl.h>
#include <nuttx/semaphore.h>
#include <nuttx/serial/serial.h>
#include "chip.h"
+1 -1
View File
@@ -49,13 +49,13 @@
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <semaphore.h>
#include <queue.h>
#include <debug.h>
#include <errno.h>
#include <nuttx/irq.h>
#include <nuttx/arch.h>
#include <nuttx/semaphore.h>
#include "up_arch.h"
#include "up_internal.h"
-1
View File
@@ -44,7 +44,6 @@
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <semaphore.h>
#include <assert.h>
#include <errno.h>
#include <debug.h>
-1
View File
@@ -41,7 +41,6 @@
#include <stdint.h>
#include <assert.h>
#include <semaphore.h>
#include <errno.h>
#include <debug.h>
-1
View File
@@ -44,7 +44,6 @@
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include <semaphore.h>
#include <errno.h>
#include <debug.h>
-1
View File
@@ -68,7 +68,6 @@
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
#include <semaphore.h>
#include <errno.h>
#include <debug.h>
-1
View File
@@ -43,7 +43,6 @@
#include <stdint.h>
#include <stdbool.h>
#include <unistd.h>
#include <semaphore.h>
#include <string.h>
#include <errno.h>
#include <debug.h>
-1
View File
@@ -43,7 +43,6 @@
#include <stdint.h>
#include <stdbool.h>
#include <semaphore.h>
#include <string.h>
#include <assert.h>
#include <debug.h>
-1
View File
@@ -44,7 +44,6 @@
#include <stdint.h>
#include <stdbool.h>
#include <unistd.h>
#include <semaphore.h>
#include <string.h>
#include <errno.h>
#include <debug.h>
-1
View File
@@ -41,7 +41,6 @@
#include <stdint.h>
#include <stdbool.h>
#include <semaphore.h>
#include <string.h>
#include <assert.h>
#include <debug.h>
-1
View File
@@ -45,7 +45,6 @@
#include <stdint.h>
#include <stdbool.h>
#include <unistd.h>
#include <semaphore.h>
#include <string.h>
#include <errno.h>
#include <debug.h>
-1
View File
@@ -68,7 +68,6 @@
#include <stdint.h>
#include <limits.h>
#include <stdbool.h>
#include <semaphore.h>
#include <errno.h>
#include <debug.h>
-1
View File
@@ -43,7 +43,6 @@
#include <stdint.h>
#include <stdbool.h>
#include <unistd.h>
#include <semaphore.h>
#include <string.h>
#include <errno.h>
#include <debug.h>
-1
View File
@@ -40,7 +40,6 @@
#include <nuttx/config.h>
#include <stdint.h>
#include <semaphore.h>
#include <errno.h>
#include <assert.h>
#include <debug.h>
+1 -1
View File
@@ -47,7 +47,6 @@
#include <stdbool.h>
#include <unistd.h>
#include <string.h>
#include <semaphore.h>
#include <errno.h>
#include <assert.h>
#include <debug.h>
@@ -61,6 +60,7 @@
#include <nuttx/fs/ioctl.h>
#include <nuttx/analog/adc.h>
#include <nuttx/analog/ioctl.h>
#include <nuttx/semaphore.h>
#include "up_arch.h"
#include "lc823450_adc.h"
+1 -1
View File
@@ -39,11 +39,11 @@
#include <nuttx/config.h>
#include <nuttx/kmalloc.h>
#include <nuttx/semaphore.h>
#include <sys/types.h>
#include <stdint.h>
#include <stdbool.h>
#include <semaphore.h>
#include <errno.h>
#include <assert.h>
#include <debug.h>
-1
View File
@@ -46,7 +46,6 @@
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include <semaphore.h>
#include <assert.h>
#include <errno.h>
#include <debug.h>
-1
View File
@@ -40,7 +40,6 @@
#include <arch/board/board.h>
#include <nuttx/config.h>
#include <semaphore.h>
#include <errno.h>
#include <debug.h>
+1 -1
View File
@@ -48,11 +48,11 @@
#include <assert.h>
#include <errno.h>
#include <debug.h>
#include <semaphore.h>
#include <nuttx/kmalloc.h>
#include <nuttx/fs/ioctl.h>
#include <nuttx/mtd/mtd.h>
#include <nuttx/semaphore.h>
#include <arch/board/board.h>
#include "lc823450_mtd.h"
+1 -2
View File
@@ -42,7 +42,6 @@
#include <nuttx/config.h>
#include <semaphore.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
@@ -51,6 +50,7 @@
#include <nuttx/arch.h>
#include <nuttx/irq.h>
#include <nuttx/clock.h>
#include <nuttx/semaphore.h>
#include <nuttx/signal.h>
#include "up_arch.h"
@@ -62,7 +62,6 @@
#include "lc823450_timer.h"
#ifdef CONFIG_LC823450_SDC_DMA
# include <semaphore.h>
# include "lc823450_dma.h"
#endif /* CONFIG_LC823450_SDC_DMA */
+1 -1
View File
@@ -44,7 +44,6 @@
#include <stdint.h>
#include <stdbool.h>
#include <unistd.h>
#include <semaphore.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
@@ -53,6 +52,7 @@
#include <nuttx/irq.h>
#include <nuttx/arch.h>
#include <nuttx/fs/ioctl.h>
#include <nuttx/semaphore.h>
#include <nuttx/serial/serial.h>
#include <arch/board/board.h>

Some files were not shown because too many files have changed in this diff Show More