fixed thread names with posix pthreads
Jay Foster
jay@systech.com
Fri Oct 21 20:14:00 GMT 2005
It looks like the code is just fine the way it is. The statement
name[16] = '\0';
further down NUL terminates the name[] string. name[] is copied from a
template, which has a fixed length.
Jay
-----Original Message-----
From: Gary Thomas [mailto:gary@mlbassoc.com]
Sent: Friday, October 21, 2005 8:00 AM
To: Stefan Sommerfeld
Cc: eCos patches
Subject: Re: fixed thread names with posix pthreads
On Fri, 2005-10-21 at 16:32 +0200, Stefan Sommerfeld wrote:
> Hi,
>
> There was the zero termination missing with the thread name in
> pthread_create().
Why rewrite the whole loop (and make it more complicated)?
It would be sufficient to just add one line to put in the
termination character. Just add this line after the for loop:
name[i] = '\0';
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
More information about the Ecos-patches
mailing list