Skip to content

Commit

Permalink
userspace: Exclude nuttx/arch.h
Browse files Browse the repository at this point in the history
This patch fixed userspace headers conflict. Architecture-related definition and API should not be exposed to users.

Signed-off-by: ouyangxiangzhen <[email protected]>
  • Loading branch information
Fix-Point authored and xiaoxiang781216 committed Nov 1, 2024
1 parent b271507 commit 17c51c0
Show file tree
Hide file tree
Showing 98 changed files with 111 additions and 32 deletions.
1 change: 1 addition & 0 deletions arch/risc-v/src/bl602/bl602_oneshot_lowerhalf.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <assert.h>
#include <debug.h>

#include <nuttx/arch.h>
#include <nuttx/irq.h>
#include <nuttx/kmalloc.h>
#include <nuttx/timers/oneshot.h>
Expand Down
1 change: 1 addition & 0 deletions arch/risc-v/src/bl602/bl602_os_hal.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
#include <syslog.h>

#include <nuttx/config.h>
#include <nuttx/arch.h>
#include <nuttx/irq.h>
#include <nuttx/kthread.h>
#include <nuttx/mqueue.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/risc-v/src/common/espressif/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ endif

ESP_HAL_3RDPARTY_REPO = esp-hal-3rdparty
ifndef ESP_HAL_3RDPARTY_VERSION
ESP_HAL_3RDPARTY_VERSION = ca869dd97ed2c01187b85b759c0d6edb27c12c21
ESP_HAL_3RDPARTY_VERSION = e3899a2324c8e326db20f99f208e890fdd7a5b92
endif

ifndef ESP_HAL_3RDPARTY_URL
Expand Down
1 change: 1 addition & 0 deletions arch/risc-v/src/common/riscv_mtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* Included Files
****************************************************************************/

#include <nuttx/arch.h>
#include <nuttx/irq.h>
#include <nuttx/kmalloc.h>

Expand Down
2 changes: 1 addition & 1 deletion arch/risc-v/src/esp32c3-legacy/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ endif

ESP_HAL_3RDPARTY_REPO = esp-hal-3rdparty
ifndef ESP_HAL_3RDPARTY_VERSION
ESP_HAL_3RDPARTY_VERSION = 51afbfd1a17e806fa6fd8227a18395c1bbecbad3
ESP_HAL_3RDPARTY_VERSION = e3899a2324c8e326db20f99f208e890fdd7a5b92
endif

ifndef ESP_HAL_3RDPARTY_URL
Expand Down
2 changes: 2 additions & 0 deletions arch/risc-v/src/esp32c3-legacy/esp32c3_efuse_lowerhalf.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include <stdlib.h>
#include <debug.h>
#include <assert.h>

#include <nuttx/irq.h>
#include <nuttx/kmalloc.h>
#include <nuttx/efuse/efuse.h>

Expand Down
1 change: 1 addition & 0 deletions arch/x86_64/src/intel64/intel64_oneshot.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <nuttx/config.h>

#include <nuttx/compiler.h>
#include <nuttx/clock.h>

#include <intel64_hpet.h>

Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/src/esp32/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ endif

ESP_HAL_3RDPARTY_REPO = esp-hal-3rdparty
ifndef ESP_HAL_3RDPARTY_VERSION
ESP_HAL_3RDPARTY_VERSION = b4c723a119344b4b71d69819019d55637fb570fd
ESP_HAL_3RDPARTY_VERSION = e3899a2324c8e326db20f99f208e890fdd7a5b92
endif

ifndef ESP_HAL_3RDPARTY_URL
Expand Down
2 changes: 2 additions & 0 deletions arch/xtensa/src/esp32/esp32_efuse_lowerhalf.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include <stdlib.h>
#include <debug.h>
#include <assert.h>

#include <nuttx/irq.h>
#include <nuttx/kmalloc.h>
#include <nuttx/efuse/efuse.h>

Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/src/esp32s2/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ endif

ESP_HAL_3RDPARTY_REPO = esp-hal-3rdparty
ifndef ESP_HAL_3RDPARTY_VERSION
ESP_HAL_3RDPARTY_VERSION = b4c723a119344b4b71d69819019d55637fb570fd
ESP_HAL_3RDPARTY_VERSION = e3899a2324c8e326db20f99f208e890fdd7a5b92
endif

ifndef ESP_HAL_3RDPARTY_URL
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/src/esp32s3/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ endif

ESP_HAL_3RDPARTY_REPO = esp-hal-3rdparty
ifndef ESP_HAL_3RDPARTY_VERSION
ESP_HAL_3RDPARTY_VERSION = b4c723a119344b4b71d69819019d55637fb570fd
ESP_HAL_3RDPARTY_VERSION = e3899a2324c8e326db20f99f208e890fdd7a5b92
endif

ifndef ESP_HAL_3RDPARTY_URL
Expand Down
1 change: 1 addition & 0 deletions binfmt/binfmt_unloadmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <debug.h>
#include <errno.h>

#include <nuttx/arch.h>
#include <nuttx/addrenv.h>
#include <nuttx/kmalloc.h>
#include <nuttx/binfmt/binfmt.h>
Expand Down
2 changes: 1 addition & 1 deletion boards/arm/imxrt/imxrt1050-evk/kernel/imxrt_userspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include <stdlib.h>

#include <nuttx/userspace.h>
#include <nuttx/arch.h>
#include <nuttx/wqueue.h>
#include <nuttx/mm/mm.h>

Expand Down
2 changes: 1 addition & 1 deletion boards/arm/imxrt/imxrt1060-evk/kernel/imxrt_userspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include <stdlib.h>

#include <nuttx/userspace.h>
#include <nuttx/arch.h>
#include <nuttx/wqueue.h>
#include <nuttx/mm/mm.h>

Expand Down
2 changes: 1 addition & 1 deletion boards/arm/imxrt/imxrt1064-evk/kernel/imxrt_userspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include <stdlib.h>

#include <nuttx/userspace.h>
#include <nuttx/arch.h>
#include <nuttx/wqueue.h>
#include <nuttx/mm/mm.h>

Expand Down
2 changes: 1 addition & 1 deletion boards/arm/imxrt/imxrt1170-evk/kernel/imxrt_userspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include <stdlib.h>

#include <nuttx/userspace.h>
#include <nuttx/arch.h>
#include <nuttx/wqueue.h>
#include <nuttx/mm/mm.h>

Expand Down
2 changes: 1 addition & 1 deletion boards/arm/imxrt/teensy-4.x/kernel/imxrt_userspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include <stdlib.h>

#include <nuttx/userspace.h>
#include <nuttx/arch.h>
#include <nuttx/wqueue.h>
#include <nuttx/mm/mm.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include <stdlib.h>

#include <nuttx/userspace.h>
#include <nuttx/arch.h>
#include <nuttx/wqueue.h>
#include <nuttx/mm/mm.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include <stdlib.h>

#include <nuttx/userspace.h>
#include <nuttx/arch.h>
#include <nuttx/wqueue.h>
#include <nuttx/mm/mm.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include <stdlib.h>

#include <nuttx/userspace.h>
#include <nuttx/arch.h>
#include <nuttx/wqueue.h>
#include <nuttx/mm/mm.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include <stdlib.h>

#include <nuttx/userspace.h>
#include <nuttx/arch.h>
#include <nuttx/wqueue.h>
#include <nuttx/mm/mm.h>

Expand Down
2 changes: 1 addition & 1 deletion boards/arm/mps/mps2-an500/kernel/mps_userspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include <stdlib.h>

#include <nuttx/userspace.h>
#include <nuttx/arch.h>
#include <nuttx/wqueue.h>
#include <nuttx/mm/mm.h>

Expand Down
2 changes: 1 addition & 1 deletion boards/arm/s32k3xx/mr-canhubk3/kernel/s32k3xx_userspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include <stdlib.h>

#include <nuttx/userspace.h>
#include <nuttx/arch.h>
#include <nuttx/wqueue.h>
#include <nuttx/mm/mm.h>

Expand Down
2 changes: 1 addition & 1 deletion boards/arm/sam34/sam3u-ek/kernel/sam_userspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include <stdlib.h>

#include <nuttx/userspace.h>
#include <nuttx/arch.h>
#include <nuttx/wqueue.h>
#include <nuttx/mm/mm.h>

Expand Down
2 changes: 1 addition & 1 deletion boards/arm/samv7/same70-qmtech/kernel/sam_userspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include <stdlib.h>

#include <nuttx/userspace.h>
#include <nuttx/arch.h>
#include <nuttx/wqueue.h>
#include <nuttx/mm/mm.h>

Expand Down
2 changes: 1 addition & 1 deletion boards/arm/samv7/same70-xplained/kernel/sam_userspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include <stdlib.h>

#include <nuttx/userspace.h>
#include <nuttx/arch.h>
#include <nuttx/wqueue.h>
#include <nuttx/mm/mm.h>

Expand Down
2 changes: 1 addition & 1 deletion boards/arm/samv7/samv71-xult/kernel/sam_userspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include <stdlib.h>

#include <nuttx/userspace.h>
#include <nuttx/arch.h>
#include <nuttx/wqueue.h>
#include <nuttx/mm/mm.h>

Expand Down
2 changes: 1 addition & 1 deletion boards/arm/stm32/mikroe-stm32f4/kernel/stm32_userspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include <stdlib.h>

#include <nuttx/userspace.h>
#include <nuttx/arch.h>
#include <nuttx/wqueue.h>
#include <nuttx/mm/mm.h>

Expand Down
2 changes: 1 addition & 1 deletion boards/arm/stm32/stm3240g-eval/kernel/stm32_userspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include <stdlib.h>

#include <nuttx/userspace.h>
#include <nuttx/arch.h>
#include <nuttx/wqueue.h>
#include <nuttx/mm/mm.h>

Expand Down
1 change: 1 addition & 0 deletions crypto/cryptosoft.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <assert.h>
#include <errno.h>
#include <endian.h>
#include <strings.h>
#include <nuttx/kmalloc.h>
#include <crypto/bn.h>
#include <crypto/cryptodev.h>
Expand Down
2 changes: 2 additions & 0 deletions drivers/audio/audio_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
****************************************************************************/

#include <nuttx/config.h>
#include <nuttx/arch.h>
#include <nuttx/irq.h>
#include <nuttx/audio/audio_dma.h>
#include <nuttx/kmalloc.h>
#include <nuttx/queue.h>
Expand Down
1 change: 1 addition & 0 deletions drivers/input/goldfish_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#include <debug.h>

#include <nuttx/arch.h>
#include <nuttx/irq.h>
#include <nuttx/queue.h>
#include <nuttx/kmalloc.h>
Expand Down
1 change: 1 addition & 0 deletions drivers/input/mouse_upper.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <poll.h>

#include <nuttx/input/mouse.h>
#include <nuttx/fs/fs.h>
#include <nuttx/kmalloc.h>
#include <nuttx/mutex.h>
#include <nuttx/list.h>
Expand Down
1 change: 1 addition & 0 deletions drivers/lcd/pcf8574_lcd_backpack.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <errno.h>
#include <debug.h>

#include <nuttx/arch.h>
#include <nuttx/kmalloc.h>
#include <nuttx/mutex.h>
#include <nuttx/signal.h>
Expand Down
1 change: 1 addition & 0 deletions drivers/misc/goldfish_pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include <fcntl.h>
#include <poll.h>

#include <nuttx/arch.h>
#include <nuttx/fs/fs.h>
#include <nuttx/irq.h>
#include <nuttx/kmalloc.h>
Expand Down
1 change: 1 addition & 0 deletions drivers/misc/mkrd.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#include <nuttx/config.h>

#include <errno.h>
#include <stdint.h>
#include <string.h>
#include <debug.h>
Expand Down
2 changes: 2 additions & 0 deletions drivers/misc/optee.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#include <fcntl.h>
#include <netpacket/rpmsg.h>
#include <nuttx/drivers/optee.h>
#include <nuttx/fs/fs.h>
#include <nuttx/net/net.h>
#include <nuttx/kmalloc.h>
#include <nuttx/mutex.h>
#include <sys/mman.h>
Expand Down
1 change: 1 addition & 0 deletions drivers/mtd/gd25.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include <errno.h>
#include <debug.h>

#include <nuttx/arch.h>
#include <nuttx/kmalloc.h>
#include <nuttx/signal.h>
#include <nuttx/fs/ioctl.h>
Expand Down
1 change: 1 addition & 0 deletions drivers/mtd/mtd_rwbuffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@

#include <nuttx/kmalloc.h>
#include <nuttx/drivers/rwbuffer.h>
#include <nuttx/fs/fs.h>
#include <nuttx/fs/ioctl.h>
#include <nuttx/mtd/mtd.h>

Expand Down
1 change: 1 addition & 0 deletions drivers/mtd/rammtd.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <errno.h>
#include <debug.h>

#include <nuttx/fs/fs.h>
#include <nuttx/kmalloc.h>
#include <nuttx/fs/ioctl.h>
#include <nuttx/mtd/mtd.h>
Expand Down
1 change: 1 addition & 0 deletions drivers/net/e1000.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <debug.h>
#include <errno.h>

#include <nuttx/arch.h>
#include <nuttx/kmalloc.h>
#include <nuttx/wqueue.h>
#include <nuttx/addrenv.h>
Expand Down
1 change: 1 addition & 0 deletions drivers/net/igc.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <debug.h>
#include <errno.h>

#include <nuttx/arch.h>
#include <nuttx/kmalloc.h>
#include <nuttx/wqueue.h>
#include <nuttx/addrenv.h>
Expand Down
1 change: 1 addition & 0 deletions drivers/pci/pci_ivshmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <errno.h>
#include <debug.h>

#include <nuttx/arch.h>
#include <nuttx/kmalloc.h>
#include <nuttx/list.h>
#include <nuttx/mutex.h>
Expand Down
1 change: 1 addition & 0 deletions drivers/pipes/pipe_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include <assert.h>
#include <debug.h>

#include <nuttx/arch.h>
#include <nuttx/kmalloc.h>
#include <nuttx/semaphore.h>
#include <nuttx/fs/fs.h>
Expand Down
4 changes: 3 additions & 1 deletion drivers/power/battery/goldfish_battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@
#include <stdint.h>
#include <errno.h>
#include <debug.h>
#include <nuttx/nuttx.h>

#include <nuttx/arch.h>
#include <nuttx/kmalloc.h>
#include <nuttx/nuttx.h>
#include <nuttx/power/battery_gauge.h>
#include <nuttx/power/battery_ioctl.h>

Expand Down
1 change: 1 addition & 0 deletions drivers/rc/lirc_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <poll.h>
#include <fcntl.h>

#include <nuttx/irq.h>
#include <nuttx/kmalloc.h>
#include <nuttx/mutex.h>
#include <nuttx/circbuf.h>
Expand Down
Loading

0 comments on commit 17c51c0

Please sign in to comment.