README.txt 1.5 KB

123456789101112131415161718192021222324252627282930313233
  1. README
  2. ======
  3. This directory holds NuttX libraries. Libraries in NuttX are very special
  4. creatures. They have these properties:
  5. 1. They can be shared by both application logic and logic within the OS when
  6. using the FLAT build.
  7. 2. But in PROTECTED and KERNEL modes, they must be built differently: The
  8. copies used by applications and the OS cannot be the same. Rather,
  9. separate versions of libraries must be built for the kernel and for
  10. applications.
  11. 3. When used by the OS, some special care must be taken to assure that the
  12. OS logic does not disrupt the user's errno value and that the OS does
  13. not create inappropriate cancellation points.
  14. For example, sem_wait() is both a cancellation point and modifies the
  15. errno value. So within the FLAT build and without kernel version for
  16. the PROTECTED and KERNEL builds, the special internal OS interface
  17. nxsem_wait() must be used. Within libraries, the macro _SEM_WAIT()
  18. (as defined in include/nuttx/semaphore.h) is used instead. The
  19. definition of this macro accounts for the different usage environments.
  20. NOTE: The libraries under libs/ build differently from other NuttX
  21. components: There are no build-related files in the libs/ directory; it
  22. is simply a container for other well-known, individual library directories.
  23. The upper level Makefile logic is aware of the libraries within the libs/
  24. container.
  25. The only real function of the libs/ directory is to prevent the top-level
  26. directory from becoming cluttered with individual libraries.