15
15
#include "target_syscall.h"
16
16
#include "exec/gdbstub.h"
17
17
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
19
20
* direct system calls that take a sigset_t pointer and a size.
20
21
*/
21
22
#define SIGSET_T_SIZE (_NSIG / 8)
22
23
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.
24
26
* Basically, it replicates in user space what would be certain
25
27
* task_struct fields in the kernel
26
28
*/
@@ -48,13 +50,13 @@ struct image_info {
48
50
abi_ulong env_strings ;
49
51
abi_ulong file_string ;
50
52
uint32_t elf_flags ;
51
- int personality ;
53
+ int personality ;
52
54
abi_ulong alignment ;
53
55
54
56
/* The fields below are used in FDPIC mode. */
55
57
abi_ulong loadmap_addr ;
56
58
uint16_t nsegs ;
57
- void * loadsegs ;
59
+ void * loadsegs ;
58
60
abi_ulong pt_dynamic_addr ;
59
61
abi_ulong interpreter_loadmap_addr ;
60
62
abi_ulong interpreter_pt_dynamic_addr ;
@@ -98,8 +100,10 @@ struct emulated_sigtable {
98
100
target_siginfo_t info ;
99
101
};
100
102
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
+ */
103
107
typedef struct TaskState {
104
108
pid_t ts_tid ; /* tid (or pid) of this task */
105
109
#ifdef TARGET_ARM
@@ -134,20 +138,23 @@ typedef struct TaskState {
134
138
135
139
struct emulated_sigtable sync_signal ;
136
140
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.
138
143
* The actual signal mask of this thread may differ:
139
144
* + we don't let SIGSEGV and SIGBUS be blocked while running guest code
140
145
* + sometimes we block all signals to avoid races
141
146
*/
142
147
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
144
150
* currently in the middle of such a syscall
145
151
*/
146
152
sigset_t sigsuspend_mask ;
147
153
/* Nonzero if we're leaving a sigsuspend and sigsuspend_mask is valid. */
148
154
int in_sigsuspend ;
149
155
150
- /* Nonzero if process_pending_signals() needs to do something (either
156
+ /*
157
+ * Nonzero if process_pending_signals() needs to do something (either
151
158
* handle a pending signal or unblock signals).
152
159
* This flag is written from a signal handler so should be accessed via
153
160
* the qatomic_read() and qatomic_set() functions. (It is not accessed
@@ -168,8 +175,10 @@ extern unsigned long mmap_min_addr;
168
175
169
176
/* ??? See if we can avoid exposing so much of the loader internals. */
170
177
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
+ */
173
182
#define BPRM_BUF_SIZE 1024
174
183
175
184
/*
@@ -184,7 +193,7 @@ struct linux_binprm {
184
193
int argc , envc ;
185
194
char * * argv ;
186
195
char * * envp ;
187
- char * filename ; /* Name of binary */
196
+ char * filename ; /* Name of binary */
188
197
int (* core_dump )(int , const CPUArchState * ); /* coredump routine */
189
198
};
190
199
@@ -212,10 +221,11 @@ void do_init_thread(struct target_pt_regs *regs, struct image_info *infop);
212
221
abi_ulong loader_build_argptr (int envc , int argc , abi_ulong sp ,
213
222
abi_ulong stringp , int push_ptr );
214
223
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 ,
216
225
struct linux_binprm * );
217
226
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,
219
229
* we have to provide some information (loadmap, pt_dynamic_info) such
220
230
* that the program can be relocated adequately. This is also useful
221
231
* when handling signals.
@@ -283,7 +293,8 @@ void probe_guest_base(const char *image_name,
283
293
* with any of the host errno values.)
284
294
*/
285
295
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
287
298
* syscalls and guest signals:
288
299
*
289
300
* Guest syscalls come in two flavours:
@@ -392,7 +403,8 @@ extern long safe_syscall_base(int *pending, long number, ...);
392
403
393
404
#else
394
405
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
396
408
* fragment; note that this is racy!
397
409
* This should go away when all host architectures have been updated.
398
410
*/
@@ -736,7 +748,8 @@ static inline int regpairs_aligned(void *cpu_env, int num) { return 0; }
736
748
*/
737
749
void preexit_cleanup (CPUArchState * env , int code );
738
750
739
- /* Include target-specific struct and function definitions;
751
+ /*
752
+ * Include target-specific struct and function definitions;
740
753
* they may need access to the target-independent structures
741
754
* above, so include them last.
742
755
*/
0 commit comments