From 3771196d1d5ac6a4213fdb77b4974ca69cd1ae09 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 10 May 2007 23:38:55 +0000 Subject: * sysdeps/unix/sysv/linux/sched_setaffinity.c (__sched_setaffinity_new): If syscall was successful and RESET_VGETCPU_CACHE is defined, use it before returning. * sysdeps/unix/sysv/linux/x86_64/sched_setaffinity.c: New file. --- sysdeps/unix/sysv/linux/x86_64/sched_setaffinity.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/x86_64/sched_setaffinity.c (limited to 'sysdeps/unix/sysv/linux/x86_64/sched_setaffinity.c') diff --git a/sysdeps/unix/sysv/linux/x86_64/sched_setaffinity.c b/sysdeps/unix/sysv/linux/x86_64/sched_setaffinity.c new file mode 100644 index 0000000000..d1101c56f5 --- /dev/null +++ b/sysdeps/unix/sysv/linux/x86_64/sched_setaffinity.c @@ -0,0 +1,14 @@ +#include + +#define RESET_VGETCPU_CACHE() \ + do { \ + asm volatile ("movl %0, %%fs:%P1\n\t" \ + "movl %0, %%fs:%P2" \ + : \ + : "ir" (0), "i" (offsetof (struct pthread, \ + header.vgetcpu_cache[0])), \ + "i" (offsetof (struct pthread, \ + header.vgetcpu_cache[1]))); \ + } while (0) + +#include "../sched_setaffinity.c" -- cgit 1.4.1