syscall.c (709037636992e9289ce9147e59d56fb35d90b140) syscall.c (67cc32ebfd8c0ee3fcdb26780a8991baf5eb1d45)
1/*
2 * Linux syscalls
3 *
4 * Copyright (c) 2003 Fabrice Bellard
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or

--- 3925 unchanged lines hidden (view full) ---

3934
3935 switch(arg_type[0]) {
3936 case TYPE_NULL:
3937 /* no argument */
3938 ret = get_errno(ioctl(fd, ie->host_cmd));
3939 break;
3940 case TYPE_PTRVOID:
3941 case TYPE_INT:
1/*
2 * Linux syscalls
3 *
4 * Copyright (c) 2003 Fabrice Bellard
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or

--- 3925 unchanged lines hidden (view full) ---

3934
3935 switch(arg_type[0]) {
3936 case TYPE_NULL:
3937 /* no argument */
3938 ret = get_errno(ioctl(fd, ie->host_cmd));
3939 break;
3940 case TYPE_PTRVOID:
3941 case TYPE_INT:
3942 /* int argment */
3943 ret = get_errno(ioctl(fd, ie->host_cmd, arg));
3944 break;
3945 case TYPE_PTR:
3946 arg_type++;
3947 target_size = thunk_type_size(arg_type, 0);
3948 switch(ie->access) {
3949 case IOC_R:
3950 ret = get_errno(ioctl(fd, ie->host_cmd, buf_temp));

--- 557 unchanged lines hidden (view full) ---

4508
4509static void *clone_func(void *arg)
4510{
4511 new_thread_info *info = arg;
4512 CPUArchState *env;
4513 CPUState *cpu;
4514 TaskState *ts;
4515
3942 ret = get_errno(ioctl(fd, ie->host_cmd, arg));
3943 break;
3944 case TYPE_PTR:
3945 arg_type++;
3946 target_size = thunk_type_size(arg_type, 0);
3947 switch(ie->access) {
3948 case IOC_R:
3949 ret = get_errno(ioctl(fd, ie->host_cmd, buf_temp));

--- 557 unchanged lines hidden (view full) ---

4507
4508static void *clone_func(void *arg)
4509{
4510 new_thread_info *info = arg;
4511 CPUArchState *env;
4512 CPUState *cpu;
4513 TaskState *ts;
4514
4516 rcu_register_thread();
4517 env = info->env;
4518 cpu = ENV_GET_CPU(env);
4519 thread_cpu = cpu;
4520 ts = (TaskState *)cpu->opaque;
4521 info->tid = gettid();
4522 cpu->host_tid = info->tid;
4523 task_settid(ts);
4524 if (info->child_tidptr)

--- 1085 unchanged lines hidden (view full) ---

5610 if (ts->child_tidptr) {
5611 put_user_u32(0, ts->child_tidptr);
5612 sys_futex(g2h(ts->child_tidptr), FUTEX_WAKE, INT_MAX,
5613 NULL, NULL, 0);
5614 }
5615 thread_cpu = NULL;
5616 object_unref(OBJECT(cpu));
5617 g_free(ts);
4515 env = info->env;
4516 cpu = ENV_GET_CPU(env);
4517 thread_cpu = cpu;
4518 ts = (TaskState *)cpu->opaque;
4519 info->tid = gettid();
4520 cpu->host_tid = info->tid;
4521 task_settid(ts);
4522 if (info->child_tidptr)

--- 1085 unchanged lines hidden (view full) ---

5608 if (ts->child_tidptr) {
5609 put_user_u32(0, ts->child_tidptr);
5610 sys_futex(g2h(ts->child_tidptr), FUTEX_WAKE, INT_MAX,
5611 NULL, NULL, 0);
5612 }
5613 thread_cpu = NULL;
5614 object_unref(OBJECT(cpu));
5615 g_free(ts);
5618 rcu_unregister_thread();
5619 pthread_exit(NULL);
5620 }
5621#ifdef TARGET_GPROF
5622 _mcleanup();
5623#endif
5624 gdb_exit(cpu_env, arg1);
5625 _exit(arg1);
5626 ret = 0; /* avoid warning */

--- 4266 unchanged lines hidden ---
5616 pthread_exit(NULL);
5617 }
5618#ifdef TARGET_GPROF
5619 _mcleanup();
5620#endif
5621 gdb_exit(cpu_env, arg1);
5622 _exit(arg1);
5623 ret = 0; /* avoid warning */

--- 4266 unchanged lines hidden ---