]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
lib/posix-futex: Use kernel internal `uk_sys_gettid`
authorSergiu Moga <sergiu@unikraft.io>
Fri, 7 Feb 2025 09:36:29 +0000 (11:36 +0200)
committerUnikraft Bot <monkey@unikraft.io>
Fri, 14 Feb 2025 14:16:47 +0000 (14:16 +0000)
Use the kernel internal variant of `gettid`, `uk_sys_gettid`. Unlike
`uk_syscall_r_gettid`, this variant does not involve any syscall shim
wrapper logic, but rather simply calls the system call's logic directly.

Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Andrei Tatar <andrei@unikraft.io>
Approved-by: Andrei Tatar <andrei@unikraft.io>
GitHub-Closes: #1583

lib/posix-futex/futex.c

index f64b679e112c65d23c733c9c5dd4843dab5880df..56b92465a43530df4bf2e0432f04177342fa0164 100644 (file)
@@ -373,7 +373,7 @@ UK_POSIX_CLONE_HANDLER(CLONE_CHILD_CLEARTID, true, pfutex_child_cleartid, 0x0);
  */
 UK_LLSYSCALL_R_DEFINE(pid_t, set_tid_address, pid_t *, tid_ref)
 {
-       pid_t self_tid = uk_syscall_r_gettid();
+       pid_t self_tid = uk_sys_gettid();
 
        if (self_tid >= 0) {
                /* Store new reference */