On 07/05/2019 00:07, Morgan, Keith S wrote:

I have noticed that if I do not call exit() in the POSIX_Init() function, RTEMS executables will hang. Why must I call exit() to exit the POSIX_Init() function rather than conclude with a “return” statement?


Calling exit() and returning from a POSIX thread are two totally different things. If you call exit(), then you terminate the system. If you return from a POSIX thread, then this thread exits. The scheduler just picks up the next highest priority ready thread. This could be the idle thread.

--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

_______________________________________________
users mailing list
users@rtems.org
http://lists.rtems.org/mailman/listinfo/users

Reply via email to