Re: [uClinux-dev] Re: [uClibc]POSIX threading support

From: Gagamel (gagamel88@hanmail.net)
Date: Wed Feb 27 2002 - 11:30:41 EST



Hello-

I'm working in (ARM7TDMI + uClinux-2.4.x + uClibc).
A few days ago, I looked your (Erik) words about "POSIX threading support".
In these days, as I had some hard time because of the thread library,
after looking your words, I immediately added it on my works.

In the result, test programs (ex1 ~ ex7) worked well.
But my program had a problem.
(I tested my program on x86. There was no problem.)

My program uses a macro, PTHERAD_MUTEX_INITIALIZER (in pthread.h)
to init a mutex --- not pthread_mutex_init ( ).
When I execute my app, the error occurred.
The pthread_mutex_lock() / pthread_mutex_unlock() return errors.

So, I looked around pthread_mutex_init() & pthread_mutex_lock()
in (CVS)/uClibc/libpthread/linuxthreads/mutex.c.
pthread_mutex_init () initialize as FAST_NP,
and pthread_mutex_lock() supports only FAST_NP, RECURSIVE_NP,ERRORCHECK_NP.

BTW in the pthread.h <- (CVS)/include/pthread.h ,
mutex init macro(PTHERAD_MUTEX_INITIALIZER) set the value as TIMED_NP.

I guessed you used linuxthread-2.1.2 (from glibc),
so I looked original pthread.h in linuxthread-2.1.2.
But their pthread.h was different from yours.
In original pthread.h, PTHERAD_MUTEX_INITIALIZER set FAST_NP.

So, I tried original pthread.h on your pthread c sources.
Although lock/unlock funcions didn't return errors,
the result was not so good compared with x86's

Erik, am I wrong? What do you think about ?
I'm not aware of linuxthread well.
So please explain about it .



     Gagamel  
   

=============================================================================
"¿ì¸® ÀÎÅͳÝ, Daum" http://www.daum.net


- Daumȸ¿øÀ» À§ÇÑ ÀÎÅͳݼîÇÎ + ÆÄ¿ö °øµ¿±¸¸Å ¢Ñ ¼îÇÎ µÑ·¯º¸±â
- DaumÀÌ Á¦°øÇÏ´Â 100% ¸ÂÃã ±¤°í ¼­ºñ½º ¢Ñ °Ë»ö Ű¿öµå¼¥
This message resent by the uclinux-dev@uclinux.org list server http://www.uClinux.org/

This archive was generated by hypermail 2.1.4 : Thu Sep 19 2002 - 13:20:55 EDT