fix sgx compile and link error, preserve space for locals before set/tee opcode (#214)
Co-authored-by: Xu Jun <jun1.xu@intel.com>
This commit is contained in:
@ -24,21 +24,26 @@ int os_mutex_destroy(korp_mutex *mutex)
|
||||
return BHT_OK;
|
||||
}
|
||||
|
||||
/* Returned error (EINVAL, EAGAIN and EDEADLK) from
|
||||
locking the mutex indicates some logic error present in
|
||||
the program somewhere.
|
||||
Don't try to recover error for an existing unknown error.*/
|
||||
void os_mutex_lock(korp_mutex *mutex)
|
||||
{
|
||||
sgx_thread_mutex_lock(mutex);
|
||||
}
|
||||
|
||||
/* Returned error (EINVAL, EAGAIN and EPERM) from
|
||||
unlocking the mutex indicates some logic error present
|
||||
in the program somewhere.
|
||||
Don't try to recover error for an existing unknown error.*/
|
||||
void os_mutex_unlock(korp_mutex *mutex)
|
||||
{
|
||||
sgx_thread_mutex_unlock(mutex);
|
||||
}
|
||||
|
||||
int os_cond_init(korp_cond *cond)
|
||||
{
|
||||
sgx_thread_cond_t c = SGX_THREAD_COND_INITIALIZER;
|
||||
*cond = c;
|
||||
return BHT_OK;
|
||||
}
|
||||
|
||||
int os_cond_destroy(korp_cond *cond)
|
||||
{
|
||||
sgx_thread_cond_destroy(cond);
|
||||
return BHT_OK;
|
||||
}
|
||||
|
||||
|
||||
@ -71,8 +71,8 @@ bh_print_time(const char *prompt)
|
||||
|
||||
total_time_ms += curr_time_ms - last_time_ms;
|
||||
|
||||
printf("%-48s time of last stage: %u ms, total time: %u ms\n",
|
||||
prompt, curr_time_ms - last_time_ms, total_time_ms);
|
||||
os_printf("%-48s time of last stage: %u ms, total time: %u ms\n",
|
||||
prompt, curr_time_ms - last_time_ms, total_time_ms);
|
||||
|
||||
last_time_ms = curr_time_ms;
|
||||
}
|
||||
|
||||
@ -230,7 +230,7 @@ timer_ctx_t create_timer_ctx(timer_callback_f timer_handler,
|
||||
|
||||
return ctx;
|
||||
|
||||
cleanup:
|
||||
cleanup:
|
||||
|
||||
if (ctx) {
|
||||
release_timer_list(&ctx->free_timers);
|
||||
|
||||
Reference in New Issue
Block a user