pthread names were not 0 terminated.
--
Øyvind Harboe
http://www.zylin.com/zy1000.html
ARM7 ARM9 ARM11 XScale Cortex
JTAG debugger and flash programmer
### 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 <[email protected]>
+
+ * src/pthread.cxx: 0 terminate default pthread name
+
2009-03-25 John Dallaway <[email protected]>
* src/signal.cxx (pause): Revert change of 2006-07-18 pending