aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vcl/vppcom.c7
-rw-r--r--src/vcl/vppcom.h5
2 files changed, 12 insertions, 0 deletions
diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c
index 3d08d395a27..dcbbfc44a39 100644
--- a/src/vcl/vppcom.c
+++ b/src/vcl/vppcom.c
@@ -3357,6 +3357,13 @@ vppcom_worker_register (void)
return VPPCOM_OK;
}
+void
+vppcom_worker_unregister (void)
+{
+ vcl_worker_cleanup (vcl_worker_get_current (), 1 /* notify vpp */ );
+ vcl_set_worker_index (~0);
+}
+
int
vppcom_worker_index (void)
{
diff --git a/src/vcl/vppcom.h b/src/vcl/vppcom.h
index 49cff413ec8..6dfdd267ac7 100644
--- a/src/vcl/vppcom.h
+++ b/src/vcl/vppcom.h
@@ -304,6 +304,11 @@ extern int vppcom_data_segment_copy (void *buf, vppcom_data_segments_t ds,
extern int vppcom_worker_register (void);
/**
+ * Unregister current worker
+ */
+extern void vppcom_worker_unregister (void);
+
+/**
* Retrieve current worker index
*/
extern int vppcom_worker_index (void);