diff options
author | Liong Sauw Ming <ming@teluu.com> | 2015-03-06 06:04:21 +0000 |
---|---|---|
committer | Liong Sauw Ming <ming@teluu.com> | 2015-03-06 06:04:21 +0000 |
commit | 17340134a91c4efb1b648a6f87ba5b42a6ce517a (patch) | |
tree | a0324c25e2e58070019ed91214217cd862c0fc1c /pjlib/src | |
parent | bb996ff44f5c5eb04a6f88c11869a802169ce7b2 (diff) |
Re #1782 (misc): Suppress Helgrind's warning about possible data race when doing ioq select.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4991 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/src')
-rw-r--r-- | pjlib/src/pj/ioqueue_select.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pjlib/src/pj/ioqueue_select.c b/pjlib/src/pj/ioqueue_select.c index 6be66ae5..b991f98b 100644 --- a/pjlib/src/pj/ioqueue_select.c +++ b/pjlib/src/pj/ioqueue_select.c @@ -830,6 +830,7 @@ on_error: PJ_DEF(int) pj_ioqueue_poll( pj_ioqueue_t *ioqueue, const pj_time_val *timeout) { pj_fd_set_t rfdset, wfdset, xfdset; + int nfds; int count, i, counter; pj_ioqueue_key_t *h; struct event @@ -876,10 +877,12 @@ PJ_DEF(int) pj_ioqueue_poll( pj_ioqueue_t *ioqueue, const pj_time_val *timeout) validate_sets(ioqueue, &rfdset, &wfdset, &xfdset); #endif + nfds = ioqueue->nfds; + /* Unlock ioqueue before select(). */ pj_lock_release(ioqueue->lock); - count = pj_sock_select(ioqueue->nfds+1, &rfdset, &wfdset, &xfdset, + count = pj_sock_select(nfds+1, &rfdset, &wfdset, &xfdset, timeout); if (count == 0) |