POSIX Standard

Portable operating system interface, the POSIX standard defines the interface standards that operating systems (often targeting Unix-like operating systems) should provide for applications, thereby ensuring the portability of applications at the source code level. Today, mainstream Linux systems are compatible with the POSIX standard. It can be seen that portability is a major feature of POSIX. If an operating system is compatible with the POSIX system, it will be able to easily migrate its POSIX applications to other system platforms that also comply with the POSIX standard, and can obtain a large number of POSIX applications to enrich the application ecology of its own system.

In order to provide different levels of RTOS capabilities, POSIX defines four levels: PSE51, PSE52, PSE53, and PSE54, corresponding to four operating systems respectively.

  1. Minimal Real-time System Profile IEEE Std 1003.13 PSE51, basic RTOS

  2. Real-time Controller Profile IEEE Std 1003.13 PSE52 with a simple file system... etc.

  3. Dedicated Real-time Profile IEEE Std 1003.13 PSE53, with network functions... etc.

  4. Multi-Purpose Real-time Profile IEEE Std 1003.13 PSE54, complete file system with Shell component...etc.

Since the formulation of standards is constantly updated over time, the PSE51, 52, 53, and 54 standards have also become increasingly blurred with the development of the MCU and MPU chip industries, and the continuous enhancement of chip functions and performance has made the boundaries of the four operating systems corresponding to these standards increasingly blurred. In RT-Thread, relying on its own component content, it provides partial content of multiple standards and provides software for different POSIX applications to be used on RTOS systems.

RT-Thread provides most of the interfaces for the header files and corresponding interfaces specified by the PSE51 standard. The proportion of PSE51 interfaces is shown in the pie chart below. In addition, we also provide a more complete file system interface and a network interface based on our SAL component. This lays the foundation for POSIX application migration, allowing more complex POSIX applications to be applied on the RT-Thread platform with only a few modifications.

  • POSIX FILE related interfaces include file system content and a rich interface; standard I/O interfaces, Poll/Select and other more complex functions are also supported

  • Delay related interfaces

  • Clock related interfaces, which have corresponding functions for devices with RTC hardware or without RTC hardware

  • Timer related interfaces have been connected to RT-Thread's timer interface to implement corresponding functions

  • Pthread related interfaces are widely used in multi-tasking programming

  • Dynamic Module

  • POSIX standard IPC interface: pipe, message, semaphore and other functions

Through the flexible configuration items above, developers can enable corresponding functions to add support for this type of function; this is very similar to the POSIX interface that also uses function macros to identify some function functions, and the corresponding POSIX function support can be configured in this interface.

  1. Open in menuconfig Enable BSD Socket I/O <sys/socket.h> <netdb.h>and you can use standard Socket for programming

For more detailed socket programming content, please view it under network components .

Function introduction simple routine

  1. Open in menuconfig Enable POSIX file system and I/Oto configure the specific POSIX function interface

  2. Enable required functions as required, such as device I/O, AIO, MMAN, etc.

Last updated

Assoc. Prof. Wiroon Sriborrirux, Founder of Advance Innovation Center (AIC) and Bangsaen Design House (BDH), Electrical Engineering Department, Faculty of Engineering, Burapha University