This example shows usage of POSIX APIs with FreeRTOS running underneath the POSIX layer. Usage of POSIX thread and POSIX message queue is shown in this example.
Worker mqueue #[1879656984] - start
Worker mqueue #[1879657136] - start
Worker mqueue #[1879657288] - start
Worker mqueue #[1879657440] - start
Dispatcher thread - start
Dispatcher iteration #[0] -- Sending msg to worker mqueue #[1879656984].
Dispatcher iteration #[1] -- Sending msg to worker mqueue #[1879657136].
Dispatcher iteration #[2] -- Sending msg to worker mqueue #[1879657288].
Dispatcher iteration #[3] -- Sending msg to worker mqueue #[1879657440].
Dispatcher iteration #[4] -- Sending msg to worker mqueue #[1879656984].
Dispatcher iteration #[5] -- Sending msg to worker mqueue #[1879657136].
Dispatcher iteration #[6] -- Sending msg to worker mqueue #[1879657288].
Dispatcher iteration #[7] -- Sending msg to worker mqueue #[1879657440].
Dispatcher iteration #[8] -- Sending msg to worker mqueue #[1879656984].
Worker thread #[1879657592] -- Received eWORKER_CTRL_MSG_CONTINUE
Worker thread #[1879657592] -- Received eWORKER_CTRL_MSG_CONTINUE
Worker thread #[1879657592] -- Received eWORKER_CTRL_MSG_CONTINUE
Worker thread #[1879670840] -- Received eWORKER_CTRL_MSG_CONTINUE
Worker thread #[1879670840] -- Received eWORKER_CTRL_MSG_CONTINUE
Dispatcher iteration #[9] -- Sending msg to worker mqueue #[1879657136].
Worker thread #[1879662008] -- Received eWORKER_CTRL_MSG_CONTINUE
Worker thread #[1879662008] -- Received eWORKER_CTRL_MSG_CONTINUE
Worker thread #[1879662008] -- Received eWORKER_CTRL_MSG_CONTINUE
Dispatcher [0] -- Sending eWORKER_CTRL_MSG_EXIT to worker thread #[1879656984].
Dispatcher [1] -- Sending eWORKER_CTRL_MSG_EXIT to worker thread #[1879657136].
Dispatcher [2] -- Sending eWORKER_CTRL_MSG_EXIT to worker thread #[1879657288].
Worker thread #[1879657592] -- Finished. Exit now.
Worker thread #[1879666424] -- Received eWORKER_CTRL_MSG_CONTINUE
Worker thread #[1879666424] -- Received eWORKER_CTRL_MSG_CONTINUE
Worker thread #[1879666424] -- Finished. Exit now.
Dispatcher [3] -- Sending eWORKER_CTRL_MSG_EXIT to worker thread #[1879657440].
Worker thread #[1879662008] -- Finished. Exit now.
Worker thread #[1879670840] -- Finished. Exit now.
All tests have passed!!