why must POSIX_Init() call exit() rather than use a "return" statement?
Sebastian Huber
sebastian.huber at embedded-brains.de
Tue May 7 05:10:09 UTC 2019
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.huber at embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the users
mailing list