Browse Source

[Pal/Linux-SGX] Call exit in pal_start_thread on normal termination

This ensures that pal_start_thread never returns during normal operation
like pal_linux_main.
Simon Gaiser 6 years ago
parent
commit
6dec95e6fa
1 changed files with 1 additions and 0 deletions
  1. 1 0
      Pal/src/host/Linux-SGX/db_threading.c

+ 1 - 0
Pal/src/host/Linux-SGX/db_threading.c

@@ -77,6 +77,7 @@ void pal_start_thread (void)
     new_thread->param = NULL;
     SET_ENCLAVE_TLS(thread, new_thread);
     callback((void *) param);
+    _DkThreadExit();
 }
 
 /* _DkThreadCreate for internal use. Create an internal thread