Skip to content

Commit 400b7f6

Browse files
pm215vivier
authored andcommitted
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 <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Message-Id: <[email protected]> Signed-off-by: Laurent Vivier <[email protected]>
1 parent 7d79344 commit 400b7f6

File tree

1 file changed

+30
-17
lines changed

1 file changed

+30
-17
lines changed

linux-user/qemu.h

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@
1515
#include "target_syscall.h"
1616
#include "exec/gdbstub.h"
1717

18-
/* This is the size of the host kernel's sigset_t, needed where we make
18+
/*
19+
* This is the size of the host kernel's sigset_t, needed where we make
1920
* direct system calls that take a sigset_t pointer and a size.
2021
*/
2122
#define SIGSET_T_SIZE (_NSIG / 8)
2223

23-
/* This struct is used to hold certain information about the image.
24+
/*
25+
* This struct is used to hold certain information about the image.
2426
* Basically, it replicates in user space what would be certain
2527
* task_struct fields in the kernel
2628
*/
@@ -48,13 +50,13 @@ struct image_info {
4850
abi_ulong env_strings;
4951
abi_ulong file_string;
5052
uint32_t elf_flags;
51-
int personality;
53+
int personality;
5254
abi_ulong alignment;
5355

5456
/* The fields below are used in FDPIC mode. */
5557
abi_ulong loadmap_addr;
5658
uint16_t nsegs;
57-
void *loadsegs;
59+
void *loadsegs;
5860
abi_ulong pt_dynamic_addr;
5961
abi_ulong interpreter_loadmap_addr;
6062
abi_ulong interpreter_pt_dynamic_addr;
@@ -98,8 +100,10 @@ struct emulated_sigtable {
98100
target_siginfo_t info;
99101
};
100102

101-
/* NOTE: we force a big alignment so that the stack stored after is
102-
aligned too */
103+
/*
104+
* NOTE: we force a big alignment so that the stack stored after is
105+
* aligned too
106+
*/
103107
typedef struct TaskState {
104108
pid_t ts_tid; /* tid (or pid) of this task */
105109
#ifdef TARGET_ARM
@@ -134,20 +138,23 @@ typedef struct TaskState {
134138

135139
struct emulated_sigtable sync_signal;
136140
struct emulated_sigtable sigtab[TARGET_NSIG];
137-
/* This thread's signal mask, as requested by the guest program.
141+
/*
142+
* This thread's signal mask, as requested by the guest program.
138143
* The actual signal mask of this thread may differ:
139144
* + we don't let SIGSEGV and SIGBUS be blocked while running guest code
140145
* + sometimes we block all signals to avoid races
141146
*/
142147
sigset_t signal_mask;
143-
/* The signal mask imposed by a guest sigsuspend syscall, if we are
148+
/*
149+
* The signal mask imposed by a guest sigsuspend syscall, if we are
144150
* currently in the middle of such a syscall
145151
*/
146152
sigset_t sigsuspend_mask;
147153
/* Nonzero if we're leaving a sigsuspend and sigsuspend_mask is valid. */
148154
int in_sigsuspend;
149155

150-
/* Nonzero if process_pending_signals() needs to do something (either
156+
/*
157+
* Nonzero if process_pending_signals() needs to do something (either
151158
* handle a pending signal or unblock signals).
152159
* This flag is written from a signal handler so should be accessed via
153160
* the qatomic_read() and qatomic_set() functions. (It is not accessed
@@ -168,8 +175,10 @@ extern unsigned long mmap_min_addr;
168175

169176
/* ??? See if we can avoid exposing so much of the loader internals. */
170177

171-
/* Read a good amount of data initially, to hopefully get all the
172-
program headers loaded. */
178+
/*
179+
* Read a good amount of data initially, to hopefully get all the
180+
* program headers loaded.
181+
*/
173182
#define BPRM_BUF_SIZE 1024
174183

175184
/*
@@ -184,7 +193,7 @@ struct linux_binprm {
184193
int argc, envc;
185194
char **argv;
186195
char **envp;
187-
char * filename; /* Name of binary */
196+
char *filename; /* Name of binary */
188197
int (*core_dump)(int, const CPUArchState *); /* coredump routine */
189198
};
190199

@@ -212,10 +221,11 @@ void do_init_thread(struct target_pt_regs *regs, struct image_info *infop);
212221
abi_ulong loader_build_argptr(int envc, int argc, abi_ulong sp,
213222
abi_ulong stringp, int push_ptr);
214223
int loader_exec(int fdexec, const char *filename, char **argv, char **envp,
215-
struct target_pt_regs * regs, struct image_info *infop,
224+
struct target_pt_regs *regs, struct image_info *infop,
216225
struct linux_binprm *);
217226

218-
/* Returns true if the image uses the FDPIC ABI. If this is the case,
227+
/*
228+
* Returns true if the image uses the FDPIC ABI. If this is the case,
219229
* we have to provide some information (loadmap, pt_dynamic_info) such
220230
* that the program can be relocated adequately. This is also useful
221231
* when handling signals.
@@ -283,7 +293,8 @@ void probe_guest_base(const char *image_name,
283293
* with any of the host errno values.)
284294
*/
285295

286-
/* A guide to using safe_syscall() to handle interactions between guest
296+
/*
297+
* A guide to using safe_syscall() to handle interactions between guest
287298
* syscalls and guest signals:
288299
*
289300
* Guest syscalls come in two flavours:
@@ -392,7 +403,8 @@ extern long safe_syscall_base(int *pending, long number, ...);
392403

393404
#else
394405

395-
/* Fallback for architectures which don't yet provide a safe-syscall assembly
406+
/*
407+
* Fallback for architectures which don't yet provide a safe-syscall assembly
396408
* fragment; note that this is racy!
397409
* This should go away when all host architectures have been updated.
398410
*/
@@ -736,7 +748,8 @@ static inline int regpairs_aligned(void *cpu_env, int num) { return 0; }
736748
*/
737749
void preexit_cleanup(CPUArchState *env, int code);
738750

739-
/* Include target-specific struct and function definitions;
751+
/*
752+
* Include target-specific struct and function definitions;
740753
* they may need access to the target-independent structures
741754
* above, so include them last.
742755
*/

0 commit comments

Comments
 (0)