Intel® Software Guard Extensions (Intel® SGX)
Use hardware-based isolation and memory encryption to provide more code protection in your solutions.

Intel SGX Pthreads

PYuhala
Beginner
535 Views

Hello,

The latest Intel SGX developer Reference for Linux* OS (version 2.12) specifies (from page 137) APIs provided by the SGX pthread library. However there is not any example Sample code that uses or shows how to use these APIs in SGX applications. More specifically, what are the associated header files to import, EDL files etc. 

I have tried using the API (pthread_create(...) etc) after adding "-lsgx_pthread" in my link options, but this alone does not seem to be enough; the said routines are not found by my compiler. 

0 Kudos
1 Solution
JesusG_Intel
Moderator
520 Views

Hello PYuhala,

In addition to adding -lsgx_pthread to your link statement in the Makefile, you must...

  1. Copy sgxsdk/include/sgx_pthread.edl to your Enclave source directory.
  2. In Enclave.edl, add: from "sgx_pthread.edl" import *;
  3. In Enclave.cpp, add: #include "pthread.h"

 

View solution in original post

3 Replies
JesusG_Intel
Moderator
521 Views

Hello PYuhala,

In addition to adding -lsgx_pthread to your link statement in the Makefile, you must...

  1. Copy sgxsdk/include/sgx_pthread.edl to your Enclave source directory.
  2. In Enclave.edl, add: from "sgx_pthread.edl" import *;
  3. In Enclave.cpp, add: #include "pthread.h"

 

View solution in original post

PYuhala
Beginner
506 Views

Hello, 

Thank you for your response. Will do as you have said.

JesusG_Intel
Moderator
487 Views

This thread has been marked as answered and Intel will no longer monitor this thread. If you want a response from Intel in a follow-up question, please open a new thread.


Reply