diff options
| author | Dinesh Dutt <5016467+ddutt@users.noreply.github.com> | 2019-08-12 06:19:54 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-12 06:19:54 -0700 |
| commit | 642b081be34f151a6d1bf7bf5c1586bc8561702c (patch) | |
| tree | e0705cd29d73db5e3df71a57d03ec350af936905 /lib/thread.c | |
| parent | dcc1615e1b5f8f439f01fd9e61845f377d28a07a (diff) | |
| parent | 595ad74b772ef1e32a1c238e6bc8ae7eb447cd27 (diff) | |
Merge pull request #1 from FRRouting/master
Merging from upstream tree
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 f862ce5eb0..5756ebc1f9 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 "command.h" @@ -737,6 +738,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]; @@ -750,6 +754,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; } |
