Hi, It looks like the context has already changed by the time the thread_exitted extension is called, so RTEMS_SELF does not get what you want.
The rtems_tcb structure however contains 'Object->id' and 'Object->name' which show the previous task running. On 2 March 2018 at 06:39, Christian Mauderer < [email protected]> wrote: > Am 02.03.2018 um 02:59 schrieb Joel Sherrill: > > > > > > On Mar 1, 2018 11:03 AM, "Matthew J Fletcher" <[email protected] > > <mailto:[email protected]>> wrote: > > > > Hi, > > > > So if a thread returns without deleting itself you get the following > > error,.. but may i make the observation that it might be more > > helpful print the rtems_name of said thread ? > > > > *** FATAL *** > > fatal source: 0 (INTERNAL_ERROR_CORE) > > fatal code: 5 (INTERNAL_ERROR_THREAD_EXITTED) > > RTEMS version: 5.0.0 > > RTEMS tools: 7.2.1 20171120 [gcc-7-branch revision > > 9785e4dda79:9e029c9094e:b2ec65b6e88dcbf61ac59114605113e1136f2ac5] > > > > > > Please file a ticket. There may be more cases where an id and name are > > useful. > > > > > > Hello Matthew, > > if you need some quick solution: This should be possible with a user > thread extension. Without testing, it should be something like the > following: > > ---- > static void thread_exitted_print_info(rtems_tcb *tcb) > { > char name[5]; > char *rv; > > rv = rtems_object_get_name(RTEMS_SELF, sizeof(name), name); > > if (rv) { > printk("Thread exited: %s\n", rv); > } else { > printk("Thread exited but couldn't get name.\n"); > } > } > > /* In your configuration: */ > #define CONFIGURE_INITIAL_EXTENSIONS \ > { .thread_exited = thread_exitted_print_info } > ---- > > Regards > > Christian > > -- > -------------------------------------------- > embedded brains GmbH > Herr Christian Mauderer > Dornierstr. 4 > D-82178 Puchheim > Germany > email: [email protected] > Phone: +49-89-18 94 741 - 18 > Fax: +49-89-18 94 741 - 08 > PGP: Public key available on request. > > Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. > -- regards --- Matthew J Fletcher
_______________________________________________ users mailing list [email protected] http://lists.rtems.org/mailman/listinfo/users
