projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add gettid() for proper thread affinity on Linux
[fio.git]
/
os
/
os-linux.h
diff --git
a/os/os-linux.h
b/os/os-linux.h
index 34a7cc53fb33d680e6750bd16c20e127ed51df89..a36552ba68ba93caf6ca58e5fc9761fc53c0b88d 100644
(file)
--- a/
os/os-linux.h
+++ b/
os/os-linux.h
@@
-41,6
+41,7
@@
#define FIO_HAVE_TRIM
#define FIO_HAVE_BINJECT
#define FIO_HAVE_CLOCK_MONOTONIC
#define FIO_HAVE_TRIM
#define FIO_HAVE_BINJECT
#define FIO_HAVE_CLOCK_MONOTONIC
+#define FIO_HAVE_GETTID
/*
* Can only enable this for newer glibcs, or the header and defines are
/*
* Can only enable this for newer glibcs, or the header and defines are
@@
-109,6
+110,11
@@
static inline int ioprio_set(int which, int who, int ioprio)
return syscall(__NR_ioprio_set, which, who, ioprio);
}
return syscall(__NR_ioprio_set, which, who, ioprio);
}
+static inline int gettid(void)
+{
+ return syscall(__NR_gettid);
+}
+
/*
* Just check for SPLICE_F_MOVE, if that isn't there, assume the others
* aren't either.
/*
* Just check for SPLICE_F_MOVE, if that isn't there, assume the others
* aren't either.