]> git.proxmox.com Git - mirror_frr.git/commitdiff
lib: Add thread_execute_name
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 30 Nov 2017 00:35:30 +0000 (19:35 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 13 Sep 2018 14:50:50 +0000 (10:50 -0400)
Allow the user to specify a run name for display in
'show thread cpu' that is different than the function
name we are calling.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
lib/thread.h

index 01ff4daf423f57eff0c63615073ae42062988977..70090cf7841447b4146cc0747aca95d9dba09ba6 100644 (file)
@@ -170,6 +170,8 @@ struct cpu_thread_history {
 #define thread_add_timer_tv(m,f,a,v,t) funcname_thread_add_timer_tv(m,f,a,v,t,#f,__FILE__,__LINE__)
 #define thread_add_event(m,f,a,v,t) funcname_thread_add_event(m,f,a,v,t,#f,__FILE__,__LINE__)
 #define thread_execute(m,f,a,v) funcname_thread_execute(m,f,a,v,#f,__FILE__,__LINE__)
+#define thread_execute_name(m, f, a, v, n)                             \
+       funcname_thread_execute(m, f, a, v, n, __FILE__, __LINE__)
 
 /* Prototypes. */
 extern struct thread_master *thread_master_create(const char *);