uti: Replace data types represented as arrays with C structures
Defining C structures for the following objects: (1) Remote and local context (2) Stack of system call arguments / return values Change-Id: Iafbb6c795bd765e3c78c54a255d8a1e4d4536288
This commit is contained in:
@ -8,17 +8,20 @@ struct syscall_struct {
|
||||
unsigned long uti_clv; /* copy of a clv in McKernel */
|
||||
};
|
||||
|
||||
#define UTI_SZ_SYSCALL_STACK 16
|
||||
|
||||
/* Variables accessed by mcexec.c and syscall_intercept.c */
|
||||
struct uti_desc {
|
||||
void *wp; /* Syscall arguments list and record of McKernel context and Linux context */
|
||||
char lctx[4096]; /* TODO: Get the size from config.h */
|
||||
char rctx[4096]; /* TODO: Get the size from config.h */
|
||||
int mck_tid; /* TODO: Move this out for multiple migrated-to-Linux threads */
|
||||
unsigned long key; /* struct task_struct* of mcexec thread, used to search struct host_thread */
|
||||
int pid, tid; /* Used as the id of tracee when issuing MCEXEC_UP_TERMINATE_THREAD */
|
||||
unsigned long uti_clv; /* copy of McKernel clv */
|
||||
|
||||
int fd; /* /dev/mcosX */
|
||||
struct syscall_struct *syscall_param_top; /* stack-pointer of syscall arguments list */
|
||||
struct syscall_struct *syscall_param; /* TODO: make it auto variable */
|
||||
struct syscall_struct syscall_stack[UTI_SZ_SYSCALL_STACK]; /* stack of system call arguments and return values */
|
||||
int syscall_stack_top; /* stack-pointer of syscall arguments list */
|
||||
long syscalls[512], syscalls2[512]; /* Syscall profile counters */
|
||||
int start_syscall_intercept; /* Used to sync between mcexec.c and syscall_intercept.c */
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user