static int init_epoll_per_thread()
{
- int fd;
-
epoll_events = calloc(1, sizeof(struct epoll_event) * global.tune.maxpollevents);
if (epoll_events == NULL)
goto fail_alloc;
* fd for this thread. Let's just mark them as updated, the poller will
* do the rest.
*/
- for (fd = 0; fd < global.maxsock; fd++)
- updt_fd_polling(fd);
+ fd_reregister_all(tgid, ti->ltid_bit);
return 1;
fail_fd:
static int init_evports_per_thread()
{
- int fd;
-
evports_evlist_max = global.tune.maxpollevents;
evports_evlist = calloc(evports_evlist_max, sizeof(*evports_evlist));
if (evports_evlist == NULL) {
* fd for this thread. Let's just mark them as updated, the poller will
* do the rest.
*/
- for (fd = 0; fd < global.maxsock; fd++)
- updt_fd_polling(fd);
+ fd_reregister_all(tgid, ti->ltid_bit);
return 1;
static int init_kqueue_per_thread()
{
- int fd;
-
/* we can have up to two events per fd, so allocate enough to store
* 2*fd event, and an extra one, in case EV_RECEIPT isn't defined,
* so that we can add an invalid entry and get an error, to avoid
* fd for this thread. Let's just mark them as updated, the poller will
* do the rest.
*/
- for (fd = 0; fd < global.maxsock; fd++)
- updt_fd_polling(fd);
+ fd_reregister_all(tgid, ti->ltid_bit);
return 1;
fail_fd: