OSDN Git Service

nptl_db: handle SUSv4-OB
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Sun, 29 Jan 2012 14:21:38 +0000 (15:21 +0100)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Sun, 29 Jan 2012 16:51:18 +0000 (17:51 +0100)
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>
libpthread/nptl/sysdeps/pthread/pthread.h
libpthread/nptl_db/Makefile.in
libpthread/nptl_db/thread_db.h

index deb7430..98c84ae 100644 (file)
@@ -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;
 
index a3fc1cd..b158529 100644 (file)
@@ -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))
 
index 433b54f..23cb5c6 100644 (file)
@@ -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);