[En-Nut-Discussion] How to get some comfort with threads?

Ulrich Prinz uprinz2 at netscape.net
Wed Sep 2 22:18:16 CEST 2009


Hi!

I'd like to give some debug while system starts up. With dvice drivers 
it is easy as the dev->dev_name gives an easy access to the devices name.

But with threads I don't know how to get the name of a thread.

I can do something like this:
if( NutThreadCreate("isAlive", isAlive, 0, 256))
     printf("Thread isAlive started\n");

if( NutThreadCreate("display", display, 0, 512))
     printf("Thread display started\n");

But I'd like to may be use a function to start up the thread and report 
success or error by giving the name to the debug output.
Ah, and I don't like to search for an ID in a list or something like that.

And has someone any idea how to find out why a thread has died?

Any idea?

Best regards, Ulrich



More information about the En-Nut-Discussion mailing list