Mercurial > hg > graal-jvmci-8
diff src/os/linux/vm/os_linux.hpp @ 3826:7c2653aefc46
7060836: RHEL 5.5 and 5.6 should support UseNUMA
Summary: Add a wrapper for sched_getcpu() for systems where libc lacks it
Reviewed-by: ysr
Contributed-by: Andrew John Hughes <ahughes@redhat.com>
author | iveresov |
---|---|
date | Fri, 05 Aug 2011 16:50:14 -0700 |
parents | 139667d9836a |
children | 7432b9db36ff |
line wrap: on
line diff
--- a/src/os/linux/vm/os_linux.hpp Fri Aug 05 16:44:01 2011 -0700 +++ b/src/os/linux/vm/os_linux.hpp Fri Aug 05 16:50:14 2011 -0700 @@ -263,6 +263,7 @@ static void set_numa_tonode_memory(numa_tonode_memory_func_t func) { _numa_tonode_memory = func; } static void set_numa_interleave_memory(numa_interleave_memory_func_t func) { _numa_interleave_memory = func; } static void set_numa_all_nodes(unsigned long* ptr) { _numa_all_nodes = ptr; } + static int sched_getcpu_syscall(void); public: static int sched_getcpu() { return _sched_getcpu != NULL ? _sched_getcpu() : -1; } static int numa_node_to_cpus(int node, unsigned long *buffer, int bufferlen) {