diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2018-09-12 21:25:49 +0200 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2018-09-19 22:01:50 +0200 |
commit | 64777f5d87e5e6a1b58e555f1e15849746808400 (patch) | |
tree | 6bd9c29387d689f0faf18f4998837510db8b0ac2 /lib/frr_pthread.h | |
parent | lib: remove frr_pthread->id (diff) | |
download | frr-64777f5d87e5e6a1b58e555f1e15849746808400.tar.xz frr-64777f5d87e5e6a1b58e555f1e15849746808400.zip |
lib: remove unused frr_pthread_yield()
OS-level yield is generally a bad and possibly dangerous idea. If the
thread should be suspended, there should always be something to wait on,
or it turns into busy waiting. And if it's "just giving something else
the chance to run" - that's the kernel's job to determine, and the
kernel will do so while considering priorities, cgroups, and whatnot.
Let it do its job.
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib/frr_pthread.h')
-rw-r--r-- | lib/frr_pthread.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/lib/frr_pthread.h b/lib/frr_pthread.h index 2a41de6d4..b9e60511d 100644 --- a/lib/frr_pthread.h +++ b/lib/frr_pthread.h @@ -210,9 +210,6 @@ int frr_pthread_stop(struct frr_pthread *fpt, void **result); /* Stops all frr_pthread's. */ void frr_pthread_stop_all(void); -/* Yields the current thread of execution */ -void frr_pthread_yield(void); - #ifndef HAVE_PTHREAD_CONDATTR_SETCLOCK #define pthread_condattr_setclock(A, B) #endif |