* 0 terminate pthread names
@ 2009-10-09 10:43 Øyvind Harboe
0 siblings, 0 replies; only message in thread
From: Øyvind Harboe @ 2009-10-09 10:43 UTC (permalink / raw)
To: ecos-patches
[-- Attachment #1: Type: text/plain, Size: 164 bytes --]
pthread names were not 0 terminated.
--
Øyvind Harboe
http://www.zylin.com/zy1000.html
ARM7 ARM9 ARM11 XScale Cortex
JTAG debugger and flash programmer
[-- Attachment #2: pthreadnamefix.txt --]
[-- Type: text/plain, Size: 1476 bytes --]
### Eclipse Workspace Patch 1.0
#P statoilecos
Index: packages/compat/posix/current/src/pthread.cxx
===================================================================
RCS file: /cvs/ecos/ecos/packages/compat/posix/current/src/pthread.cxx,v
retrieving revision 1.16
diff -u -r1.16 pthread.cxx
--- packages/compat/posix/current/src/pthread.cxx 29 Jan 2009 17:47:52 -0000 1.16
+++ packages/compat/posix/current/src/pthread.cxx 9 Oct 2009 10:39:52 -0000
@@ -595,8 +595,10 @@
char *name = nthread->name;
static char *name_template = "pthread.00000000";
pthread_t id = nthread->id;
-
- for( int i = 0; name_template[i]; i++ ) name[i] = name_template[i];
+
+ int i;
+ for( i = 0; name_template[i]; i++ ) name[i] = name_template[i];
+ name[i] = 0;
// dump the id, in hex into the name.
for( int i = 15; i >= 8; i-- )
Index: packages/compat/posix/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/compat/posix/current/ChangeLog,v
retrieving revision 1.56
diff -u -r1.56 ChangeLog
--- packages/compat/posix/current/ChangeLog 25 Mar 2009 08:03:56 -0000 1.56
+++ packages/compat/posix/current/ChangeLog 9 Oct 2009 10:39:52 -0000
@@ -1,3 +1,7 @@
+2009-10-09 Øyvind Harboe <oyvind.harboe@zylin.com>
+
+ * src/pthread.cxx: 0 terminate default pthread name
+
2009-03-25 John Dallaway <john@dallaway.org.uk>
* src/signal.cxx (pause): Revert change of 2006-07-18 pending
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-10-09 10:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-09 10:43 0 terminate pthread names Øyvind Harboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).