  
  CTrustThread * CEnclave::get_tcs(int ecall_cmd)
  {
-@@ -487,9 +507,9 @@
+@@ -487,9 +534,9 @@
      //m_loader.destroy_enclave();
  }
  

diff -Nur common/inc/internal/rts_cmd.h common/inc/internal/rts_cmd.h
--- common/inc/internal/rts_cmd.h
+++ common/inc/internal/rts_cmd.h
@@ -36,6 +36,7 @@
 #define ECMD_EXCEPT         -3
 #define ECMD_MKTCS          -4
 #define ECMD_UNINIT_ENCLAVE -5
+#define ECMD_UTILITY        -6
 
 /* Built-in ECall command for Switchless SGX */
 #define ECMD_INIT_SWITCHLESS         (-6)
diff -Nur common/inc/internal/se_tcrypto_common.h common/inc/internal/se_tcrypto_common.h
--- common/inc/internal/se_tcrypto_common.h
+++ common/inc/internal/se_tcrypto_common.h

     {
         return trust_thread;
     }
@@ -334,7 +342,8 @@
     LockGuard lock(&m_thread_mutex);
     CTrustThread *trust_thread = NULL;
     bool is_special_ecall = (ecall_cmd == ECMD_INIT_ENCLAVE) || (ecall_cmd == ECMD_UNINIT_ENCLAVE) ;
-    
+    bool is_user_utility = (ecall_cmd == ECMD_UTILITY || ecall_cmd == ECMD_UTILITY_EXCEPT);
+    bool is_user_utility_exception = (ecall_cmd == ECMD_UTILITY_EXCEPT);
 
     if(is_special_ecall == true)
     {
@@ -357,6 +366,23 @@
             trust_thread = _acquire_thread();
         }
     }
