aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra/os.h
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2020-01-21 12:34:55 -0500
committerFlorin Coras <florin.coras@gmail.com>2020-02-05 23:38:56 +0000
commita690fdbfe179e0ea65818c03b52535bf9210efd0 (patch)
tree345200955b873dbc2f5bb6857b1acc7966ffed90 /src/vppinfra/os.h
parent86e8bce44f43c1f3c50a3397f9ab850f484f4cad (diff)
vppinfra: numa vector placement support
Type: feature Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I7e7d95a089dd849c1f01ecea84529d8dbf239f21
Diffstat (limited to 'src/vppinfra/os.h')
-rw-r--r--src/vppinfra/os.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/vppinfra/os.h b/src/vppinfra/os.h
index 50a4ad97c93..cd3b4289da6 100644
--- a/src/vppinfra/os.h
+++ b/src/vppinfra/os.h
@@ -57,6 +57,7 @@ void os_out_of_memory (void);
f64 os_cpu_clock_frequency (void);
extern __thread uword __os_thread_index;
+extern __thread uword __os_numa_index;
static_always_inline uword
os_get_thread_index (void)
@@ -71,6 +72,18 @@ os_set_thread_index (uword thread_index)
}
static_always_inline uword
+os_get_numa_index (void)
+{
+ return __os_numa_index;
+}
+
+static_always_inline void
+os_set_numa_index (uword numa_index)
+{
+ __os_numa_index = numa_index;
+}
+
+static_always_inline uword
os_get_cpu_number (void) __attribute__ ((deprecated));
static_always_inline uword