diff options
author | kikht <kikht@yandex-team.ru> | 2022-02-10 16:45:14 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:14 +0300 |
commit | 778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (patch) | |
tree | be835aa92c6248212e705f25388ebafcf84bc7a1 /contrib/libs/libevent/select.c | |
parent | 194cae0e8855b11be2005e1eff12c660c3ee9774 (diff) | |
download | ydb-778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5.tar.gz |
Restoring authorship annotation for <kikht@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/libevent/select.c')
-rw-r--r-- | contrib/libs/libevent/select.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/contrib/libs/libevent/select.c b/contrib/libs/libevent/select.c index 8925a63ca6..b1db0e44b6 100644 --- a/contrib/libs/libevent/select.c +++ b/contrib/libs/libevent/select.c @@ -27,21 +27,21 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "event2/event-config.h" -#include "evconfig-private.h" - -#ifdef EVENT__HAVE_SELECT - -#ifdef __APPLE__ -/* Apple wants us to define this if we might ever pass more than - * FD_SETSIZE bits to select(). */ -#define _DARWIN_UNLIMITED_SELECT -#endif - +#include "evconfig-private.h" + +#ifdef EVENT__HAVE_SELECT + +#ifdef __APPLE__ +/* Apple wants us to define this if we might ever pass more than + * FD_SETSIZE bits to select(). */ +#define _DARWIN_UNLIMITED_SELECT +#endif + #include <sys/types.h> -#ifdef EVENT__HAVE_SYS_TIME_H +#ifdef EVENT__HAVE_SYS_TIME_H #include <sys/time.h> #endif -#ifdef EVENT__HAVE_SYS_SELECT_H +#ifdef EVENT__HAVE_SYS_SELECT_H #include <sys/select.h> #endif #include <sys/queue.h> @@ -59,7 +59,7 @@ #include "log-internal.h" #include "evmap-internal.h" -#ifndef EVENT__HAVE_FD_MASK +#ifndef EVENT__HAVE_FD_MASK /* This type is mandatory, but Android doesn't define it. */ typedef unsigned long fd_mask; #endif @@ -119,10 +119,10 @@ select_init(struct event_base *base) return (NULL); } - evsig_init_(base); + evsig_init_(base); + + evutil_weakrand_seed_(&base->weakrand_seed, 0); - evutil_weakrand_seed_(&base->weakrand_seed, 0); - return (sop); } @@ -188,7 +188,7 @@ select_dispatch(struct event_base *base, struct timeval *tv) event_debug(("%s: select reports %d", __func__, res)); check_selectop(sop); - i = evutil_weakrand_range_(&base->weakrand_seed, nfds); + i = evutil_weakrand_range_(&base->weakrand_seed, nfds); for (j = 0; j < nfds; ++j) { if (++i >= nfds) i = 0; @@ -201,7 +201,7 @@ select_dispatch(struct event_base *base, struct timeval *tv) if (res == 0) continue; - evmap_io_active_(base, i, res); + evmap_io_active_(base, i, res); } check_selectop(sop); @@ -338,9 +338,9 @@ select_free_selectop(struct selectop *sop) static void select_dealloc(struct event_base *base) { - evsig_dealloc_(base); + evsig_dealloc_(base); select_free_selectop(base->evbase); } - -#endif /* EVENT__HAVE_SELECT */ + +#endif /* EVENT__HAVE_SELECT */ |