Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unneeded init_clock_res #835

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sgx-lkl-musl
6 changes: 2 additions & 4 deletions src/enclave/enclave_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ static void _enter_user_space(
args.num_ethreads = num_ethreads;
args.sw_debug_mode = sgxlkl_in_sw_debug_mode();
args.__gdb_load_debug_symbols_alive_ptr = &__gdb_load_debug_symbols_alive;
memcpy(args.clock_res, clock_res, sizeof(args.clock_res));

(*proc)(&args, sizeof(args));
}
Expand Down Expand Up @@ -245,14 +244,13 @@ int __libc_init_enclave(int argc, char** argv)
tmp[i].tv_sec = hex_to_int(cfg->clock_res[i].resolution, 8);
tmp[i].tv_nsec = hex_to_int(cfg->clock_res[i].resolution + 8, 8);
}
init_clock_res(tmp);

size_t max_lthreads =
cfg->max_user_threads * sizeof(*__scheduler_queue.buffer);
max_lthreads = next_power_of_2(max_lthreads);

newmpmcq(&__scheduler_queue, max_lthreads, 0);

init_ethread_tp();

size_t espins = cfg->espins;
Expand All @@ -262,7 +260,7 @@ int __libc_init_enclave(int argc, char** argv)
SGXLKL_VERBOSE("calling _lthread_sched_init()\n");
_lthread_sched_init(cfg->stacksize);


/* Run startmain() in a new lthread */
{
static startmain_args_t args;
Expand Down
2 changes: 0 additions & 2 deletions user/enter.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ void sgxlkl_user_enter(sgxlkl_userargs_t* args, size_t args_size)

init_sysconf(args->num_ethreads, args->num_ethreads);

init_clock_res((struct timespec*)args->clock_res);

__init_libc(args->argv + args->argc + 1, args->argv[0]);
__libc_start_init();
_barrier();
Expand Down
3 changes: 0 additions & 3 deletions user/userargs.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ typedef struct sgxlkl_userargs
const void* elf64_hdr;
size_t num_ethreads;

/* to be passed to init_clock_res() */
struct sgxlkl_user_timespec clock_res[8];

/* where in debug mode or not */
bool sw_debug_mode;

Expand Down