[uClibc]a little bug in libpthread NOMMU_INITIAL_THREAD_BOUNDS

Zhao TC tczhao at linpus.com.tw
Thu Dec 12 03:45:22 UTC 2002


Dear all,
	When I  try to us libpthread in uClibc-0.9.16 with my 
uClibc-0.9.9/MIPS/uClinux  target, I found that when I try to produce threads 
more then 3, it just go  wrong. After 2 days working, I found it due to a 
marco in file <libpthread/linuxthread/internal.h>
#define NOMMU_INITIAL_THREAD_BOUNDS(tos,bos) \
  if ((tos)>=__pthread_initial_thread_bos &&  
(bos)<=__pthread_initial_thread_tos) __pthread_initial_thread_bos = (tos)+1

after change bos to tos, it is workd:

#define NOMMU_INITIAL_THREAD_BOUNDS(tos,bos) \
  if ((tos)>=__pthread_initial_thread_bos &&  
(tos)<=__pthread_initial_thread_tos) __pthread_initial_thread_bos = (tos)+1

Be ware that, in uClinux box, it is possible that a thread's stack is totlly 
upper then initial thread. I learn it from debug output of libpthread.

Zhao Tiecheng

Linpus, Shanghai



More information about the uClibc mailing list