Implement stat and getentropy for sgx with ocall to run tensorflow (#436)
This commit is contained in:
@ -130,6 +130,12 @@ int ocall_closedir(void* dirp)
|
||||
return -1;
|
||||
}
|
||||
|
||||
int ocall_stat(const char *pathname,
|
||||
void *buf, unsigned int buf_len)
|
||||
{
|
||||
return stat(pathname, (struct stat *)buf);
|
||||
}
|
||||
|
||||
int ocall_fstat(int fd, void *buf, unsigned int buf_len)
|
||||
{
|
||||
return fstat(fd, (struct stat *)buf);
|
||||
@ -277,6 +283,11 @@ ssize_t ocall_getrandom(void *buf, size_t buflen, unsigned int flags)
|
||||
return getrandom(buf, buflen, flags);
|
||||
}
|
||||
|
||||
int ocall_getentropy(void *buffer, size_t length)
|
||||
{
|
||||
return getentropy(buffer, length);
|
||||
}
|
||||
|
||||
int ocall_sched_yield()
|
||||
{
|
||||
return sched_yield();
|
||||
|
||||
Reference in New Issue
Block a user