diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2020-09-15 13:03:38 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2020-09-23 13:45:52 +0100 |
commit | 5cd9c382b7ed3592c83b5b396db1a1298e323de0 (patch) | |
tree | fe3ba7c69459f5aaa6b1d7be4e79475ca9095581 /tcg/mips/tcg-target.c.inc | |
parent | b0b58514679a5529a32ae54a907642a6e27626b5 (diff) |
fdmon-poll: reset npfd when upgrading to fdmon-epoll
npfd keeps track of how many pollfds are currently being monitored. It
must be reset to 0 when fdmon_poll_wait() returns.
When npfd reaches a treshold we switch to fdmon-epoll because it scales
better.
This patch resets npfd in the case where we switch to fdmon-epoll.
Forgetting to do so results in the following assertion failure:
util/fdmon-poll.c:65: fdmon_poll_wait: Assertion `npfd == 0' failed.
Fixes: 1f050a4690f62a1e7dabc4f44141e9f762c3769f ("aio-posix: extract ppoll(2) and epoll(7) fd monitoring")
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1869952
Message-Id: <20200915120339.702938-2-stefanha@redhat.com>
Diffstat (limited to 'tcg/mips/tcg-target.c.inc')
0 files changed, 0 insertions, 0 deletions