yangsong8-a1 opened a new pull request, #21607:
URL: https://github.com/apache/nuttx/pull/21607

   ## Summary
   nuttx/userspace.h includes pthread.h, but it only needs main_t, which
   sys/types.h already defines. pthread.h was needed for pthread_startup(),
   which was removed when pthread_create moved to user space (bb9b58bddea).
   nuttx/mm/mm.h includes nuttx/userspace.h, so
   every file that includes nuttx/mm/mm.h, directly or through
   nuttx/lib/lib.h, nuttx/kmalloc.h and others, gets pthread.h and the
   headers it pulls in (unistd.h, sched.h, time.h, nuttx/mutex.h). Some files
   use declarations from those headers without including them.
   
   This series drops the include and adds the headers that files really use:
   
   - Fix the existing nxstyle errors in 9 files touched below, so the CI style
     check passes (whitespace and line wrapping only)
   - Add the missing assert.h for DEBUGASSERT() users
   - Add the missing nuttx/mutex.h for nxmutex_*() users
   - Remove pthread.h from nuttx/userspace.h and add the missing
     nuttx/kmalloc.h and unistd.h
   
   ## Impact
   Build only. No functional change. Out-of-tree code that relied on
   nuttx/userspace.h for pthread.h, unistd.h, sched.h, time.h or
   nuttx/mutex.h has to include them directly.
   
   ## Testing
   Ubuntu 22.04, gcc 13.1, arm-none-eabi-gcc, aarch64-none-elf-gcc. The
   nxstyle commit was checked to leave the token stream of each file
   unchanged. Built with tools/configure.sh and make:
   
   - sim:nsh, sim:mnemofs, sim:usbdev
   - qemu-armv8a:nsh, qemu-armv8a:rpserver, qemu-armv8a:knsh,
     qemu-armv7a:nsh
   - stm32f4discovery:nsh, nucleo-h743zi:nsh, stm32h735g-dk:lvgl
   - gd32f450zk-eval:fmcfsnsh, pic32czca70-curiosity:nsh, imxrt1170-evk:nsh
   - nrf52832-dk:mrf24j40_mac, nrf5340-dk:nsh_cpuapp
   - spresense:rndis, spresense:audio
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to