summaryrefslogtreecommitdiffstats
path: root/src/vlib/main.h
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2019-05-20 10:28:57 -0400
committerDamjan Marion <dmarion@me.com>2019-05-24 08:25:57 +0000
commit5f2cfb21fdf6eb4a32346809c8cee2550d775b19 (patch)
treee54364d08bd2dc2f851df3f0aa9a0689e9569635 /src/vlib/main.h
parentaea0df3d54d90eac3b8085ab8023c502b96bdbf0 (diff)
Add callback multiplex support
Change-Id: Iddeb3a1b0e20706e72ec8f74dabc60b342f003ba Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vlib/main.h')
-rw-r--r--src/vlib/main.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/vlib/main.h b/src/vlib/main.h
index 42f0c5196da..9b6311601d3 100644
--- a/src/vlib/main.h
+++ b/src/vlib/main.h
@@ -94,11 +94,14 @@ typedef struct vlib_main_t
u32 node_counts_per_main_loop[2];
/* Main loop hw / sw performance counters */
- void (*vlib_node_runtime_perf_counter_cb) (struct vlib_main_t *,
- u64 *, u64 *,
- vlib_node_runtime_t *,
- vlib_frame_t *, int);
-
+ void (**vlib_node_runtime_perf_counter_cbs) (struct vlib_main_t *,
+ u64 *, u64 *,
+ vlib_node_runtime_t *,
+ vlib_frame_t *, int);
+ void (**vlib_node_runtime_perf_counter_cb_tmp) (struct vlib_main_t *,
+ u64 *, u64 *,
+ vlib_node_runtime_t *,
+ vlib_frame_t *, int);
/* Every so often we switch to the next counter. */
#define VLIB_LOG2_MAIN_LOOPS_PER_STATS_UPDATE 7
@@ -215,7 +218,10 @@ typedef struct vlib_main_t
u8 **argv;
/* Top of (worker) dispatch loop callback */
- volatile void (*worker_thread_main_loop_callback) (struct vlib_main_t *);
+ void (**volatile worker_thread_main_loop_callbacks) (struct vlib_main_t *);
+ void (**volatile worker_thread_main_loop_callback_tmp)
+ (struct vlib_main_t *);
+ clib_spinlock_t worker_thread_main_loop_callback_lock;
/* debugging */
volatile int parked_at_barrier;