diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2017-04-03 00:51:20 +0200 |
|---|---|---|
| committer | David Lamparter <equinox@diac24.net> | 2019-07-31 03:34:09 +0200 |
| commit | 3e41733f1bbe9ccd7d08441f5962b3dc6db2c644 (patch) | |
| tree | 1b124e0d8445624aea99d9ce21544bf76e9bec8d /lib/thread.c | |
| parent | 30ef834ab3b50c09e103a82742b67ae4b0bac9f5 (diff) | |
lib: RCU
Please refer to doc/developer/rcu.rst for documentation.
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib/thread.c')
| -rw-r--r-- | lib/thread.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/thread.c b/lib/thread.c index fc2de09df0..0436f31c3d 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -25,6 +25,7 @@ #include "thread.h" #include "memory.h" +#include "frrcu.h" #include "log.h" #include "hash.h" #include "pqueue.h" @@ -753,6 +754,9 @@ static int fd_poll(struct thread_master *m, struct pollfd *pfds, nfds_t pfdsize, < 0) // effect a poll (return immediately) timeout = 0; + rcu_read_unlock(); + rcu_assert_read_unlocked(); + /* add poll pipe poker */ assert(count + 1 < pfdsize); pfds[count].fd = m->io_pipe[0]; @@ -766,6 +770,8 @@ static int fd_poll(struct thread_master *m, struct pollfd *pfds, nfds_t pfdsize, while (read(m->io_pipe[0], &trash, sizeof(trash)) > 0) ; + rcu_read_lock(); + return num; } |
