linux-user: Clean up do_syscall() Coding Style for TARGET_NR_exit
In particular fix 6-/10-char indentation. Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
1d5791f4a6
commit
9b056fcc5b
|
@ -5044,42 +5044,43 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
|
||||||
switch(num) {
|
switch(num) {
|
||||||
case TARGET_NR_exit:
|
case TARGET_NR_exit:
|
||||||
#ifdef CONFIG_USE_NPTL
|
#ifdef CONFIG_USE_NPTL
|
||||||
/* In old applications this may be used to implement _exit(2).
|
/* In old applications this may be used to implement _exit(2).
|
||||||
However in threaded applictions it is used for thread termination,
|
However in threaded applictions it is used for thread termination,
|
||||||
and _exit_group is used for application termination.
|
and _exit_group is used for application termination.
|
||||||
Do thread termination if we have more then one thread. */
|
Do thread termination if we have more then one thread. */
|
||||||
/* FIXME: This probably breaks if a signal arrives. We should probably
|
/* FIXME: This probably breaks if a signal arrives. We should probably
|
||||||
be disabling signals. */
|
be disabling signals. */
|
||||||
if (first_cpu->next_cpu) {
|
if (first_cpu->next_cpu) {
|
||||||
TaskState *ts;
|
TaskState *ts;
|
||||||
CPUArchState **lastp;
|
CPUArchState **lastp;
|
||||||
CPUArchState *p;
|
CPUArchState *p;
|
||||||
|
|
||||||
cpu_list_lock();
|
cpu_list_lock();
|
||||||
lastp = &first_cpu;
|
lastp = &first_cpu;
|
||||||
p = first_cpu;
|
p = first_cpu;
|
||||||
while (p && p != (CPUArchState *)cpu_env) {
|
while (p && p != (CPUArchState *)cpu_env) {
|
||||||
lastp = &p->next_cpu;
|
lastp = &p->next_cpu;
|
||||||
p = p->next_cpu;
|
p = p->next_cpu;
|
||||||
}
|
}
|
||||||
/* If we didn't find the CPU for this thread then something is
|
/* If we didn't find the CPU for this thread then something is
|
||||||
horribly wrong. */
|
horribly wrong. */
|
||||||
if (!p)
|
if (!p) {
|
||||||
abort();
|
abort();
|
||||||
/* Remove the CPU from the list. */
|
}
|
||||||
*lastp = p->next_cpu;
|
/* Remove the CPU from the list. */
|
||||||
cpu_list_unlock();
|
*lastp = p->next_cpu;
|
||||||
ts = ((CPUArchState *)cpu_env)->opaque;
|
cpu_list_unlock();
|
||||||
if (ts->child_tidptr) {
|
ts = ((CPUArchState *)cpu_env)->opaque;
|
||||||
put_user_u32(0, ts->child_tidptr);
|
if (ts->child_tidptr) {
|
||||||
sys_futex(g2h(ts->child_tidptr), FUTEX_WAKE, INT_MAX,
|
put_user_u32(0, ts->child_tidptr);
|
||||||
NULL, NULL, 0);
|
sys_futex(g2h(ts->child_tidptr), FUTEX_WAKE, INT_MAX,
|
||||||
}
|
NULL, NULL, 0);
|
||||||
thread_env = NULL;
|
}
|
||||||
object_unref(OBJECT(ENV_GET_CPU(cpu_env)));
|
thread_env = NULL;
|
||||||
g_free(ts);
|
object_unref(OBJECT(ENV_GET_CPU(cpu_env)));
|
||||||
pthread_exit(NULL);
|
g_free(ts);
|
||||||
}
|
pthread_exit(NULL);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef TARGET_GPROF
|
#ifdef TARGET_GPROF
|
||||||
_mcleanup();
|
_mcleanup();
|
||||||
|
|
Loading…
Reference in New Issue