[ECOS] pthreads on i686 PC.
Fri Mar 19 23:01:00 GMT 2004
> pthread_create(&thread_id, NULL, callFunction,
I recently had a very similar problem.
pthread_create() crashed my system when a pthread was
created with the NULL attribute ... if the parent was
not a pthread. The problem seemed to lie with the
inheritance of attributes from the parent thread to
the child thread when using a NULL attribute (bad
I'm using a rather old version of eCos. A patch was
applied around June 2003 that may have changed the
behavior (an assert instead of a crash, if I remember
Behalf Of Jason Thomas
Sent: Friday, March 19, 2004 10:12 AM
Subject: [ECOS] pthreads on i686 PC.
I'm trying to use pthreads on eCos for a Xycom i686
PC. The normal cyg threading routines work perfectly,
but very simply pthread examples crash on
Here is my source:
pthread_create(&thread_id, NULL, callFunction,
void* callFunction(void* arg)
puts("I've been called!");
Also, I tried using gdb remotely to try to figure out
what exactly was going on, but for some odd reason the
symbol table never gets loaded.
I run i386-elf-gdb
(gdb) file Test.srec
Reading symbols from Test.srec...done.
(gdb) target remote <ip>:9000
Remote debugging using 184.108.40.206:9000
0x0000c158 in ?? ()
Loading section .sec1, size 0x33642 lma 0x108000
Loading section .sec2, size 0x2bdc lma 0x13b648
Loading section .sec3, size 0xff8 lma 0x13e228
Start address 0x108000, load size 225814
Transfer rate: 258073 bits/sec, 319 bytes/write.
(gdb) break callFunction
No symbol table is loaded. Use the "file" command.
I build all of my source using the -g command.
Also, a clue towards what might be happening is if I
stick "pthread_exit(NULL)" in "callFunction," the
computer hard resets. Maybe the main-thread of
execution somehow gets killed by this call?
Thanks in advance for any help!
Before posting, please read the FAQ:
and search the list archive:
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss