On 07/05/2019 16:53, Morgan, Keith S wrote:
On Monday, May 6, 2019 11:10 PM Sebastian 
Huber<sebastian.hu...@embedded-brains.de>  wrote:

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.
Ok. This makes sense. I was missing the detail about the idle thread.

However, it seems that the behavior is different between the classic API and 
the POSIX API. It seems that, in the classic API, terminating a task with a 
return statement also terminates the system.

Yes, a function return from a Classic API task results in a fatal error. You must use rtems_task_delete() or rtems_task_exit() to terminate a Classic API task.

--
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