linux-user: Fix coding style nits in qemu.h

We're about to move a lot of the code in qemu.h out into different
header files; fix the coding style nits first so that checkpatch
is happy with the pure code-movement patches. This is mostly
block-comment style but also a few whitespace issues.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210908154405.15417-2-peter.maydell@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
master
Peter Maydell 2021-09-08 16:43:57 +01:00 committed by Laurent Vivier
parent 7d79344d4f
commit 400b7f6d14
1 changed files with 30 additions and 17 deletions

View File

@ -15,12 +15,14 @@
#include "target_syscall.h" #include "target_syscall.h"
#include "exec/gdbstub.h" #include "exec/gdbstub.h"
/* This is the size of the host kernel's sigset_t, needed where we make /*
* This is the size of the host kernel's sigset_t, needed where we make
* direct system calls that take a sigset_t pointer and a size. * direct system calls that take a sigset_t pointer and a size.
*/ */
#define SIGSET_T_SIZE (_NSIG / 8) #define SIGSET_T_SIZE (_NSIG / 8)
/* This struct is used to hold certain information about the image. /*
* This struct is used to hold certain information about the image.
* Basically, it replicates in user space what would be certain * Basically, it replicates in user space what would be certain
* task_struct fields in the kernel * task_struct fields in the kernel
*/ */
@ -98,8 +100,10 @@ struct emulated_sigtable {
target_siginfo_t info; target_siginfo_t info;
}; };
/* NOTE: we force a big alignment so that the stack stored after is /*
aligned too */ * NOTE: we force a big alignment so that the stack stored after is
* aligned too
*/
typedef struct TaskState { typedef struct TaskState {
pid_t ts_tid; /* tid (or pid) of this task */ pid_t ts_tid; /* tid (or pid) of this task */
#ifdef TARGET_ARM #ifdef TARGET_ARM
@ -134,20 +138,23 @@ typedef struct TaskState {
struct emulated_sigtable sync_signal; struct emulated_sigtable sync_signal;
struct emulated_sigtable sigtab[TARGET_NSIG]; struct emulated_sigtable sigtab[TARGET_NSIG];
/* This thread's signal mask, as requested by the guest program. /*
* This thread's signal mask, as requested by the guest program.
* The actual signal mask of this thread may differ: * The actual signal mask of this thread may differ:
* + we don't let SIGSEGV and SIGBUS be blocked while running guest code * + we don't let SIGSEGV and SIGBUS be blocked while running guest code
* + sometimes we block all signals to avoid races * + sometimes we block all signals to avoid races
*/ */
sigset_t signal_mask; sigset_t signal_mask;
/* The signal mask imposed by a guest sigsuspend syscall, if we are /*
* The signal mask imposed by a guest sigsuspend syscall, if we are
* currently in the middle of such a syscall * currently in the middle of such a syscall
*/ */
sigset_t sigsuspend_mask; sigset_t sigsuspend_mask;
/* Nonzero if we're leaving a sigsuspend and sigsuspend_mask is valid. */ /* Nonzero if we're leaving a sigsuspend and sigsuspend_mask is valid. */
int in_sigsuspend; int in_sigsuspend;
/* Nonzero if process_pending_signals() needs to do something (either /*
* Nonzero if process_pending_signals() needs to do something (either
* handle a pending signal or unblock signals). * handle a pending signal or unblock signals).
* This flag is written from a signal handler so should be accessed via * This flag is written from a signal handler so should be accessed via
* the qatomic_read() and qatomic_set() functions. (It is not accessed * the qatomic_read() and qatomic_set() functions. (It is not accessed
@ -168,8 +175,10 @@ extern unsigned long mmap_min_addr;
/* ??? See if we can avoid exposing so much of the loader internals. */ /* ??? See if we can avoid exposing so much of the loader internals. */
/* Read a good amount of data initially, to hopefully get all the /*
program headers loaded. */ * Read a good amount of data initially, to hopefully get all the
* program headers loaded.
*/
#define BPRM_BUF_SIZE 1024 #define BPRM_BUF_SIZE 1024
/* /*
@ -215,7 +224,8 @@ int loader_exec(int fdexec, const char *filename, char **argv, char **envp,
struct target_pt_regs *regs, struct image_info *infop, struct target_pt_regs *regs, struct image_info *infop,
struct linux_binprm *); struct linux_binprm *);
/* Returns true if the image uses the FDPIC ABI. If this is the case, /*
* Returns true if the image uses the FDPIC ABI. If this is the case,
* we have to provide some information (loadmap, pt_dynamic_info) such * we have to provide some information (loadmap, pt_dynamic_info) such
* that the program can be relocated adequately. This is also useful * that the program can be relocated adequately. This is also useful
* when handling signals. * when handling signals.
@ -283,7 +293,8 @@ void probe_guest_base(const char *image_name,
* with any of the host errno values.) * with any of the host errno values.)
*/ */
/* A guide to using safe_syscall() to handle interactions between guest /*
* A guide to using safe_syscall() to handle interactions between guest
* syscalls and guest signals: * syscalls and guest signals:
* *
* Guest syscalls come in two flavours: * Guest syscalls come in two flavours:
@ -392,7 +403,8 @@ extern long safe_syscall_base(int *pending, long number, ...);
#else #else
/* Fallback for architectures which don't yet provide a safe-syscall assembly /*
* Fallback for architectures which don't yet provide a safe-syscall assembly
* fragment; note that this is racy! * fragment; note that this is racy!
* This should go away when all host architectures have been updated. * This should go away when all host architectures have been updated.
*/ */
@ -736,7 +748,8 @@ static inline int regpairs_aligned(void *cpu_env, int num) { return 0; }
*/ */
void preexit_cleanup(CPUArchState *env, int code); void preexit_cleanup(CPUArchState *env, int code);
/* Include target-specific struct and function definitions; /*
* Include target-specific struct and function definitions;
* they may need access to the target-independent structures * they may need access to the target-independent structures
* above, so include them last. * above, so include them last.
*/ */