[uClibc]pthreads in mips ...

Erik Andersen andersen at codepoet.org
Fri Sep 20 14:36:28 UTC 2002


On Fri Sep 20, 2002 at 07:40:34PM +0530, David Koo wrote:
> Hi All,
> 
>     Do uclibc pthreads in mips run properly? The following code I've
> written does not seem to run at all (no printfs, nothing) when I
> (compile and) run it on a mips board. The same thing runs when
> compiled (with glibc pthreads) for i386. I tried 'strace'ing it - the
> 'strace' just stops after a while ... I need a <Ctrl-C> to get back
> the shell prompt.  I've pasted the strace output as well.
> 
>     Oh yes, uClibc-0.9.15.
> 
>     Anybody has any clues? Am I doing something wrong?
> 
>     Thanks for any help.

It works on my mips box and does the same thing with either
glibc or uClibc.... 

$ uname -a
Linux phoenix 2.4.19-rc1 #1 Thu Jul 11 08:19:30 MDT 2002 mips unknown
$ cat /proc/cpuinfo  | head -n 4
system type             : MIPS Cobalt
processor               : 0
cpu model               : Nevada V10.0  FPU V10.0
BogoMIPS                : 249.85
$ /usr/mipsel-linux-uclibc/bin/mipsel-uclibc-gcc -Wall -Os mallocpth.c -o mallocpth -lpthread
mallocpth.c: In function `thread_start':
mallocpth.c:8: warning: implicit declaration of function `printf'
mallocpth.c: In function `main':
mallocpth.c:20: warning: implicit declaration of function `perror'
$ ldd ./mallocpth
	libpthread.so.0 => /usr/mipsel-linux-uclibc/lib/libpthread.so.0 (0x0x2ab06000)
	libc.so.0 => /usr/mipsel-linux-uclibc/lib/libc.so.0 (0x0x2ab5b000)
	ld-uClibc.so.0 => /usr/mipsel-linux-uclibc/lib/ld-uClibc.so.0 (0x0x2aac0000)
$ ./mallocpth 
New thread created.
original thread
New Thread
original thread
New Thread
New Thread
original thread
original thread
^C

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--



More information about the uClibc mailing list