Browse Source

[LibOS] Set clear_child_tid value for the calling thread on set_tid_address()

Isaku Yamahata 5 years ago
parent
commit
c7296d2512
1 changed files with 2 additions and 1 deletions
  1. 2 1
      LibOS/shim/src/sys/shim_getpid.c

+ 2 - 1
LibOS/shim/src/sys/shim_getpid.c

@@ -57,8 +57,9 @@ pid_t shim_do_getppid (void)
 
 int shim_do_set_tid_address (int * tidptr)
 {
+    /* http://man7.org/linux/man-pages/man2/set_tid_address.2.html */
     struct shim_thread * cur = get_cur_thread();
-    cur->set_child_tid = tidptr;
+    cur->clear_child_tid = tidptr;
     return cur->tid;
 }