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:
Xu Jun
2020-03-27 09:28:30 +08:00
committed by GitHub
parent 01e85144f4
commit 75009a2421
5 changed files with 196 additions and 136 deletions

View File

@ -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;
}