[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 08/43] linux-user: Clean up do_syscall() Coding Style
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PULL 08/43] linux-user: Clean up do_syscall() Coding Style for TARGET_NR_exit |
Date: |
Wed, 10 Jul 2013 16:33:45 +0200 |
In particular fix 6-/10-char indentation.
Signed-off-by: Andreas Färber <address@hidden>
---
linux-user/syscall.c | 73 ++++++++++++++++++++++++++--------------------------
1 file changed, 37 insertions(+), 36 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index cdd0c28..a2125fa 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -5044,42 +5044,43 @@ abi_long do_syscall(void *cpu_env, int num, abi_long
arg1,
switch(num) {
case TARGET_NR_exit:
#ifdef CONFIG_USE_NPTL
- /* In old applications this may be used to implement _exit(2).
- However in threaded applictions it is used for thread termination,
- and _exit_group is used for application termination.
- Do thread termination if we have more then one thread. */
- /* FIXME: This probably breaks if a signal arrives. We should probably
- be disabling signals. */
- if (first_cpu->next_cpu) {
- TaskState *ts;
- CPUArchState **lastp;
- CPUArchState *p;
-
- cpu_list_lock();
- lastp = &first_cpu;
- p = first_cpu;
- while (p && p != (CPUArchState *)cpu_env) {
- lastp = &p->next_cpu;
- p = p->next_cpu;
- }
- /* If we didn't find the CPU for this thread then something is
- horribly wrong. */
- if (!p)
- abort();
- /* Remove the CPU from the list. */
- *lastp = p->next_cpu;
- cpu_list_unlock();
- ts = ((CPUArchState *)cpu_env)->opaque;
- if (ts->child_tidptr) {
- put_user_u32(0, ts->child_tidptr);
- sys_futex(g2h(ts->child_tidptr), FUTEX_WAKE, INT_MAX,
- NULL, NULL, 0);
- }
- thread_env = NULL;
- object_unref(OBJECT(ENV_GET_CPU(cpu_env)));
- g_free(ts);
- pthread_exit(NULL);
- }
+ /* In old applications this may be used to implement _exit(2).
+ However in threaded applictions it is used for thread termination,
+ and _exit_group is used for application termination.
+ Do thread termination if we have more then one thread. */
+ /* FIXME: This probably breaks if a signal arrives. We should probably
+ be disabling signals. */
+ if (first_cpu->next_cpu) {
+ TaskState *ts;
+ CPUArchState **lastp;
+ CPUArchState *p;
+
+ cpu_list_lock();
+ lastp = &first_cpu;
+ p = first_cpu;
+ while (p && p != (CPUArchState *)cpu_env) {
+ lastp = &p->next_cpu;
+ p = p->next_cpu;
+ }
+ /* If we didn't find the CPU for this thread then something is
+ horribly wrong. */
+ if (!p) {
+ abort();
+ }
+ /* Remove the CPU from the list. */
+ *lastp = p->next_cpu;
+ cpu_list_unlock();
+ ts = ((CPUArchState *)cpu_env)->opaque;
+ if (ts->child_tidptr) {
+ put_user_u32(0, ts->child_tidptr);
+ sys_futex(g2h(ts->child_tidptr), FUTEX_WAKE, INT_MAX,
+ NULL, NULL, 0);
+ }
+ thread_env = NULL;
+ object_unref(OBJECT(ENV_GET_CPU(cpu_env)));
+ g_free(ts);
+ pthread_exit(NULL);
+ }
#endif
#ifdef TARGET_GPROF
_mcleanup();
--
1.8.1.4
- [Qemu-devel] [PULL 00/43] QOM CPUState patch queue 2013-07-10, Andreas Färber, 2013/07/10
- [Qemu-devel] [PULL 01/43] target-openrisc: Fix typename in openrisc_cpu_class_by_name(), Andreas Färber, 2013/07/10
- [Qemu-devel] [PULL 02/43] Revert "gdbstub: Simplify find_cpu()", Andreas Färber, 2013/07/10
- [Qemu-devel] [PULL 05/43] kvm: Free current_cpu identifier, Andreas Färber, 2013/07/10
- [Qemu-devel] [PULL 07/43] kvm: Change kvm_remove_all_breakpoints() argument to CPUState, Andreas Färber, 2013/07/10
- [Qemu-devel] [PULL 04/43] cpu: Drop unnecessary dynamic casts in *_env_get_cpu(), Andreas Färber, 2013/07/10
- [Qemu-devel] [PULL 08/43] linux-user: Clean up do_syscall() Coding Style for TARGET_NR_exit,
Andreas Färber <=
- [Qemu-devel] [PULL 11/43] bsd-user: Change thread_env to CPUState, Andreas Färber, 2013/07/10
- [Qemu-devel] [PULL 15/43] target-ppc: Don't overuse ENV_GET_CPU(), Andreas Färber, 2013/07/10
- [Qemu-devel] [PULL 16/43] target-s390x: Don't overuse ENV_GET_CPU(), Andreas Färber, 2013/07/10
- [Qemu-devel] [PULL 12/43] intc/arm_gic: Build arm_gic only once, Andreas Färber, 2013/07/10
- [Qemu-devel] [PULL 14/43] timer/arm_mptimer: Build arm_mptimer only once, Andreas Färber, 2013/07/10
- [Qemu-devel] [PULL 18/43] target-i386: Don't overuse CPUArchState, Andreas Färber, 2013/07/10
- [Qemu-devel] [PULL 20/43] target-lm32: gen_intermediate_code_internal() should be inlined, Andreas Färber, 2013/07/10
- [Qemu-devel] [PULL 06/43] cpu: Replace cpu_single_env with CPUState current_cpu, Andreas Färber, 2013/07/10
- [Qemu-devel] [PULL 17/43] target-s390x: Change handle_{hypercall, diag}() argument to S390CPU, Andreas Färber, 2013/07/10
- [Qemu-devel] [PULL 22/43] target-moxie: gen_intermediate_code_internal() should be inlined, Andreas Färber, 2013/07/10