aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2020-02-12 14:47:56 +0100
committerFlorian Fischer <florian.fl.fischer@fau.de>2020-02-12 14:47:56 +0100
commitf84e2833720e00c09f560b946cfd35c270220042 (patch)
tree3727ce789ff14f56d4af073f4bcc38e9a7f03e42
parent53abfdb666daf93dda3111988b9c722a4b7e91dc (diff)
downloadallocbench-f84e2833720e00c09f560b946cfd35c270220042.tar.gz
allocbench-f84e2833720e00c09f560b946cfd35c270220042.zip
don't use gettid glibc wrapper
-rw-r--r--src/chattymalloc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/chattymalloc.c b/src/chattymalloc.c
index bde18d4..17a9a31 100644
--- a/src/chattymalloc.c
+++ b/src/chattymalloc.c
@@ -29,6 +29,7 @@ along with allocbench. If not, see <http://www.gnu.org/licenses/>.
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
+#include <sys/syscall.h>
#include <unistd.h>
#include "chattymalloc.h"
@@ -123,7 +124,7 @@ static void
write_trace(char func, void* ptr, size_t size, size_t var_arg)
{
if (unlikely(tid == 0)) {
- tid = gettid();
+ tid = syscall(SYS_gettid);;
}
uint64_t idx = __atomic_fetch_add (&next_entry, 1, __ATOMIC_SEQ_CST);