1 | /* |
1 | /* |
2 | * libev epoll fd activity backend |
2 | * libev epoll fd activity backend |
3 | * |
3 | * |
4 | * Copyright (c) 2007,2008,2009,2010,2011 Marc Alexander Lehmann <libev@schmorp.de> |
4 | * Copyright (c) 2007,2008,2009,2010,2011,2016,2017,2019 Marc Alexander Lehmann <libev@schmorp.de> |
5 | * All rights reserved. |
5 | * All rights reserved. |
6 | * |
6 | * |
7 | * Redistribution and use in source and binary forms, with or without modifica- |
7 | * Redistribution and use in source and binary forms, with or without modifica- |
8 | * tion, are permitted provided that the following conditions are met: |
8 | * tion, are permitted provided that the following conditions are met: |
9 | * |
9 | * |
… | |
… | |
122 | anfds [fd].emask = EV_EMASK_EPERM; |
122 | anfds [fd].emask = EV_EMASK_EPERM; |
123 | |
123 | |
124 | /* add fd to epoll_eperms, if not already inside */ |
124 | /* add fd to epoll_eperms, if not already inside */ |
125 | if (!(oldmask & EV_EMASK_EPERM)) |
125 | if (!(oldmask & EV_EMASK_EPERM)) |
126 | { |
126 | { |
127 | array_needsize (int, epoll_eperms, epoll_epermmax, epoll_epermcnt + 1, EMPTY2); |
127 | array_needsize (int, epoll_eperms, epoll_epermmax, epoll_epermcnt + 1, array_needsize_noinit); |
128 | epoll_eperms [epoll_epermcnt++] = fd; |
128 | epoll_eperms [epoll_epermcnt++] = fd; |
129 | } |
129 | } |
130 | |
130 | |
131 | return; |
131 | return; |
132 | } |
132 | } |