return syscall(__NR_##name, arg1, arg2, arg3, arg4, arg5, arg6); \
}
-
+#define __NR_sys_gettid __NR_gettid
#define __NR_sys_uname __NR_uname
#define __NR_sys_getcwd1 __NR_getcwd
#define __NR_sys_getdents __NR_getdents
#endif
#ifdef __NR_gettid
-_syscall0(int, gettid)
+_syscall0(int, sys_gettid)
#else
/* This is a replacement for the host gettid() and must return a host
errno. */
-static int gettid(void) {
+static int sys_gettid(void) {
return -ENOSYS;
}
#endif
cpu = ENV_GET_CPU(env);
thread_cpu = cpu;
ts = (TaskState *)env->opaque;
- info->tid = gettid();
+ info->tid = sys_gettid();
cpu->host_tid = info->tid;
task_settid(ts);
if (info->child_tidptr)
mapping. We can't repeat the spinlock hack used above because
the child process gets its own copy of the lock. */
if (flags & CLONE_CHILD_SETTID)
- put_user_u32(gettid(), child_tidptr);
+ put_user_u32(sys_gettid(), child_tidptr);
if (flags & CLONE_PARENT_SETTID)
- put_user_u32(gettid(), parent_tidptr);
+ put_user_u32(sys_gettid(), parent_tidptr);
ts = (TaskState *)env->opaque;
if (flags & CLONE_SETTLS)
cpu_set_tls (env, newtls);
break;
#endif
case TARGET_NR_gettid:
- ret = get_errno(gettid());
+ ret = get_errno(sys_gettid());
break;
#ifdef TARGET_NR_readahead
case TARGET_NR_readahead: