Hello, POSIX world!
Create a POSIX thread with pthread_create() and join it with pthread_join().
Overview
This sample demonstrates portable POSIX thread usage on Zephyr. A worker thread is created with pthread_create(), joined with pthread_join(), and its return value is printed. The sample relies on automatic thread and thread-stack allocation so that no Zephyr-specific APIs appear in application code.
Building and Running
west build -b native_sim samples/posix/hello_world
west run
Sample Output
Hello World! native_sim from pthread_t 0x7f...
pthread_t returned 42