summaryrefslogtreecommitdiffstats
path: root/src/vlib/threads.h
diff options
context:
space:
mode:
authorDave Barach <dbarach@cisco.com>2017-09-26 10:54:34 -0400
committerJohn Lo <loj@cisco.com>2017-09-26 17:17:09 +0000
commit69128d0209ba6108430dca9cc78ab36a9b1c793e (patch)
tree744b543327338d10594c2578f66ec250d3947070 /src/vlib/threads.h
parent8a398bbae279f07b1f9203721836b60dd1f39142 (diff)
Add thread-safe event signaller, use RPC where required
Update ping code to use the new function Change-Id: Ieb753b23f8402cbe5667c22747896784c8ece937 Signed-off-by: Florin Coras <fcoras@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vlib/threads.h')
-rw-r--r--src/vlib/threads.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/vlib/threads.h b/src/vlib/threads.h
index 72340ee1a37..8931584b5a9 100644
--- a/src/vlib/threads.h
+++ b/src/vlib/threads.h
@@ -171,6 +171,13 @@ typedef struct
frame_queue_nelt_counter_t *frame_queue_histogram;
} vlib_frame_queue_main_t;
+typedef struct
+{
+ uword node_index;
+ uword type_opaque;
+ uword data;
+} vlib_process_signal_event_mt_args_t;
+
/* Called early, in thread 0's context */
clib_error_t *vlib_thread_init (vlib_main_t * vm);
@@ -510,9 +517,14 @@ vlib_get_worker_handoff_queue_elt (u32 frame_queue_index,
}
u8 *vlib_thread_stack_init (uword thread_index);
-
int vlib_thread_cb_register (struct vlib_main_t *vm,
vlib_thread_callbacks_t * cb);
+extern void *rpc_call_main_thread_cb_fn;
+
+void
+vlib_process_signal_event_mt_helper (vlib_process_signal_event_mt_args_t *
+ args);
+void vlib_rpc_call_main_thread (void *function, u8 * args, u32 size);
#endif /* included_vlib_threads_h */