configure: Make NPTL non-optional

Now all linux-user targets support building with NPTL, we can make it
mandatory. This is a good idea because:
 * NPTL is no longer new and experimental; it is completely standard
 * in practice, linux-user without NPTL is nearly useless for
   binaries built against non-ancient glibc
 * it allows us to delete the rather untested code for handling
   the non-NPTL configuration

Note that this patch leaves the CONFIG_USE_NPTL ifdefs in the
bsd-user codebase alone. This makes no change for bsd-user, since
our configure test for NPTL had a "#include <linux/futex.h>"
which means bsd-user would never have been compiled with
CONFIG_USE_NPTL defined, and it still is not.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
This commit is contained in:
Peter Maydell 2013-07-16 18:45:00 +01:00 committed by Riku Voipio
parent 2667e71c3d
commit 24cb36a61c
6 changed files with 5 additions and 133 deletions

View file

@ -92,7 +92,6 @@ int cpu_get_pic_interrupt(CPUX86State *env)
}
#endif
#if defined(CONFIG_USE_NPTL)
/***********************************************************/
/* Helper routines for implementing atomic operations. */
@ -207,43 +206,6 @@ void cpu_list_unlock(void)
{
pthread_mutex_unlock(&cpu_list_mutex);
}
#else /* if !CONFIG_USE_NPTL */
/* These are no-ops because we are not threadsafe. */
static inline void cpu_exec_start(CPUState *cpu)
{
}
static inline void cpu_exec_end(CPUState *cpu)
{
}
static inline void start_exclusive(void)
{
}
static inline void end_exclusive(void)
{
}
void fork_start(void)
{
}
void fork_end(int child)
{
if (child) {
gdbserver_fork((CPUArchState *)thread_cpu->env_ptr);
}
}
void cpu_list_lock(void)
{
}
void cpu_list_unlock(void)
{
}
#endif
#ifdef TARGET_I386
@ -3156,12 +3118,7 @@ THREAD CPUState *thread_cpu;
void task_settid(TaskState *ts)
{
if (ts->ts_tid == 0) {
#ifdef CONFIG_USE_NPTL
ts->ts_tid = (pid_t)syscall(SYS_gettid);
#else
/* when no threads are used, tid becomes pid */
ts->ts_tid = getpid();
#endif
}
}