Skip to content

Commit

Permalink
Replace gettid() with syscall(SYS_gettid) (#697)
Browse files Browse the repository at this point in the history
Signed-off-by: xige-16 <[email protected]>
  • Loading branch information
xige-16 authored Jul 16, 2024
1 parent a65b733 commit 9296231
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/knowhere/comp/thread_pool.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@
#pragma once

#include <omp.h>

#ifdef __linux__
#include <sys/resource.h>
#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 30
#include <sys/syscall.h>
#define gettid() syscall(SYS_gettid)
#endif
#endif

#include <cerrno>
#include <cstring>
Expand Down

0 comments on commit 9296231

Please sign in to comment.