Skip to content

Commit

Permalink
Use syscall(SYS_gettid) because gettid() is only in new-ish glibc
Browse files Browse the repository at this point in the history
  • Loading branch information
rocallahan committed Aug 23, 2024
1 parent 06d0b22 commit 9328bee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ContextSwitchEvent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ static bool can_use_switch_records() {
}
struct f_owner_ex own;
own.type = F_OWNER_TID;
own.pid = gettid();
own.pid = syscall(SYS_gettid);
ret = fcntl(fd, F_SETOWN_EX, &own);
if (ret < 0) {
FATAL() << "Failed to fcntl(SETOWN_EX)";
Expand Down

0 comments on commit 9328bee

Please sign in to comment.