xiaoxiang781216 commented on PR #9774:
URL: https://github.com/apache/nuttx/pull/9774#issuecomment-1630927355

   > ok I have seen the context masking within for instance pthread still that 
is a `<sys/types>` by any means. I have noticed a lot of breakage regarding the 
relationship between user defined libc APIs and sys/* ; it should be always one 
way descending, not cross-including everywhere, would simplify many things if 
OS layout was respected.
   > 
   > ```
   > 
   > `<nuttx/sys/types.h>` -> forbidden to user world
   > `<sys/types.h>`       -> include <nuttx/sys/types.h> // holds indirection 
between kern types and users
   > `<time.h>`            -> include <sys/types.h>
   > ```
   
   this is what linux do, all userspace function/macro/struct are defined in:
   https://github.com/torvalds/linux/tree/master/include/uapi
   All change in uapi must keep the binary compability and never include other 
kernel header files.


-- 
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