Revision 2f7bb878 linux-user/syscall.c

b/linux-user/syscall.c
82 82
#include "qemu.h"
83 83
#include "qemu-common.h"
84 84

  
85
#if defined(USE_NPTL)
85
#if defined(CONFIG_USE_NPTL)
86 86
#define CLONE_NPTL_FLAGS2 (CLONE_SETTLS | \
87 87
    CLONE_PARENT_SETTID | CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID)
88 88
#else
......
219 219
#if defined(TARGET_NR_set_tid_address) && defined(__NR_set_tid_address)
220 220
_syscall1(int,set_tid_address,int *,tidptr)
221 221
#endif
222
#if defined(USE_NPTL)
222
#if defined(CONFIG_USE_NPTL)
223 223
#if defined(TARGET_NR_futex) && defined(__NR_futex)
224 224
_syscall6(int,sys_futex,int *,uaddr,int,op,int,val,
225 225
          const struct timespec *,timeout,int *,uaddr2,int,val3)
......
3458 3458

  
3459 3459
#endif /* defined(TARGET_I386) */
3460 3460

  
3461
#if defined(USE_NPTL)
3461
#if defined(CONFIG_USE_NPTL)
3462 3462

  
3463 3463
#define NEW_STACK_SIZE PTHREAD_STACK_MIN
3464 3464

  
......
3527 3527
    TaskState *ts;
3528 3528
    uint8_t *new_stack;
3529 3529
    CPUState *new_env;
3530
#if defined(USE_NPTL)
3530
#if defined(CONFIG_USE_NPTL)
3531 3531
    unsigned int nptl_flags;
3532 3532
    sigset_t sigmask;
3533 3533
#endif
......
3538 3538

  
3539 3539
    if (flags & CLONE_VM) {
3540 3540
        TaskState *parent_ts = (TaskState *)env->opaque;
3541
#if defined(USE_NPTL)
3541
#if defined(CONFIG_USE_NPTL)
3542 3542
        new_thread_info info;
3543 3543
        pthread_attr_t attr;
3544 3544
#endif
......
3552 3552
        new_env->opaque = ts;
3553 3553
        ts->bprm = parent_ts->bprm;
3554 3554
        ts->info = parent_ts->info;
3555
#if defined(USE_NPTL)
3555
#if defined(CONFIG_USE_NPTL)
3556 3556
        nptl_flags = flags;
3557 3557
        flags &= ~CLONE_NPTL_FLAGS2;
3558 3558

  
......
3621 3621
            /* Child Process.  */
3622 3622
            cpu_clone_regs(env, newsp);
3623 3623
            fork_end(1);
3624
#if defined(USE_NPTL)
3624
#if defined(CONFIG_USE_NPTL)
3625 3625
            /* There is a race condition here.  The parent process could
3626 3626
               theoretically read the TID in the child process before the child
3627 3627
               tid is set.  This would require using either ptrace
......
4016 4016
}
4017 4017
#endif
4018 4018

  
4019
#if defined(USE_NPTL)
4019
#if defined(CONFIG_USE_NPTL)
4020 4020
/* ??? Using host futex calls even when target atomic operations
4021 4021
   are not really atomic probably breaks things.  However implementing
4022 4022
   futexes locally would make futexes shared between multiple processes
......
4126 4126

  
4127 4127
    switch(num) {
4128 4128
    case TARGET_NR_exit:
4129
#ifdef USE_NPTL
4129
#ifdef CONFIG_USE_NPTL
4130 4130
      /* In old applications this may be used to implement _exit(2).
4131 4131
         However in threaded applictions it is used for thread termination,
4132 4132
         and _exit_group is used for application termination.
......
6828 6828
        }
6829 6829
	break;
6830 6830
#endif
6831
#if defined(USE_NPTL)
6831
#if defined(CONFIG_USE_NPTL)
6832 6832
    case TARGET_NR_futex:
6833 6833
        ret = do_futex(arg1, arg2, arg3, arg4, arg5, arg6);
6834 6834
        break;

Also available in: Unified diff