Browse Source

nptl_db: handle SUSv4-OB

pthread_getconcurrency / pthread_setconcurrency is OBSOLETE in SUSv4
so disable pthread debug support too

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer 12 years ago
parent
commit
29962e14a1

+ 1 - 1
libpthread/nptl/sysdeps/pthread/pthread.h

@@ -430,7 +430,7 @@ extern int pthread_setschedprio (pthread_t __target_thread, int __prio)
      __THROW;
 
 
-#ifdef __USE_UNIX98
+#if defined __USE_UNIX98 && defined __UCLIBC_SUSV4_LEGACY__
 /* Determine level of concurrency.  */
 extern int pthread_getconcurrency (void) __THROW;
 

+ 3 - 0
libpthread/nptl_db/Makefile.in

@@ -22,6 +22,9 @@ libthread_db_OUT := $(top_builddir)libpthread/nptl_db
 
 libthread_db_SRC := $(wildcard $(libthread_db_DIR)/td_*.c)	\
 		    $(libthread_db_DIR)/fetch-value.c
+ifeq ($(UCLIBC_SUSV4_LEGACY),)
+libthread_db_SRC := $(filter-out td_ta_setconcurrency.c,$(libthread_db_SRC))
+endif
 
 libthread_db_OBJ := $(patsubst $(libthread_db_DIR)/%.c,$(libthread_db_OUT)/%.o,$(libthread_db_SRC))
 

+ 2 - 2
libpthread/nptl_db/thread_db.h

@@ -355,10 +355,10 @@ extern td_err_e td_ta_clear_event (const td_thragent_t *__ta,
 extern td_err_e td_ta_event_getmsg (const td_thragent_t *__ta,
 				    td_event_msg_t *__msg);
 
-
+#ifdef __UCLIBC_SUSV4_LEGACY__
 /* Set suggested concurrency level for process associated with TA.  */
 extern td_err_e td_ta_setconcurrency (const td_thragent_t *__ta, int __level);
-
+#endif
 
 /* Enable collecting statistics for process associated with TA.  */
 extern td_err_e td_ta_enable_stats (const td_thragent_t *__ta, int __enable);