]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib: disable thread scheduler funcs
authorQuentin Young <qlyoung@cumulusnetworks.com>
Thu, 12 Dec 2019 19:52:20 +0000 (14:52 -0500)
committerQuentin Young <qlyoung@nvidia.com>
Mon, 15 Nov 2021 19:45:44 +0000 (14:45 -0500)
dont work when we skip threadmaster creation / init

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
lib/thread.h

index 39f21da11d332c0fc318acc6de89f1397902eca7..2d8d61aed66803b97da5045a1bb4fe625c59926c 100644 (file)
@@ -193,6 +193,8 @@ struct cpu_thread_history {
        })                                                                     \
        /* end */
 
+#ifndef FUZZING
+
 #define thread_add_read(m,f,a,v,t)       _xref_t_a(read_write, READ,  m,f,a,v,t)
 #define thread_add_write(m,f,a,v,t)      _xref_t_a(read_write, WRITE, m,f,a,v,t)
 #define thread_add_timer(m,f,a,v,t)      _xref_t_a(timer,      TIMER, m,f,a,v,t)
@@ -213,6 +215,19 @@ struct cpu_thread_history {
                _thread_execute(&_xref, m, f, a, v);                           \
        }) /* end */
 
+#else
+
+#define thread_add_read(m,f,a,v,t) 0
+#define thread_add_write(m,f,a,v,t) 0
+#define thread_add_timer(m,f,a,v,t) 0
+#define thread_add_timer_msec(m,f,a,v,t) 0
+#define thread_add_timer_tv(m,f,a,v,t) 0
+#define thread_add_event(m,f,a,v,t) 0
+#define thread_execute(m,f,a,v) 0
+#define thread_execute_name(m, f, a, v, n) 0
+
+#endif
+
 /* Prototypes. */
 extern struct thread_master *thread_master_create(const char *);
 void thread_master_set_name(struct thread_master *master, const char *name);