summaryrefslogtreecommitdiff
path: root/lib/frr_pthread.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-01-06 11:48:11 -0500
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-01-06 14:08:30 -0500
commitb2140cb7c8620d51f55942d349612129f51d6552 (patch)
tree6ab7884dd6ee7435dfcc07985e7de4e0c3a77e4d /lib/frr_pthread.c
parentbdb6f268f3bd4e4ef5aa7e73f55569a37276c71f (diff)
lib: Add pthread_yield
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'lib/frr_pthread.c')
-rw-r--r--lib/frr_pthread.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/frr_pthread.c b/lib/frr_pthread.c
index 8b23640fa4..19dfbaf54b 100644
--- a/lib/frr_pthread.c
+++ b/lib/frr_pthread.c
@@ -19,6 +19,7 @@
#include <zebra.h>
#include <pthread.h>
+#include <sched.h>
#include "frr_pthread.h"
#include "memory.h"
@@ -182,3 +183,8 @@ unsigned int frr_pthread_get_id()
{
return next_id++;
}
+
+void frr_pthread_yield(void)
+{
+ (void)sched_yield();
+}