Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About How to Support EPOLLET Issue in ST #32

Open
huguanghui opened this issue Sep 5, 2022 · 0 comments
Open

About How to Support EPOLLET Issue in ST #32

huguanghui opened this issue Sep 5, 2022 · 0 comments

Comments

@huguanghui
Copy link

huguanghui commented Sep 5, 2022

In the usage scenario, it is necessary to change the trigger of EPOLL to EPOLLET. It is normal to directly call the native interface in the system. However, direct modification in ST is invalid. The modifications are as follows.

        if (events != old_events) {
            op = old_events ? EPOLL_CTL_MOD : EPOLL_CTL_ADD;
            ev.events = events | EPOLLET;
            ev.data.fd = fd;
            if (epoll_ctl(_st_epoll_data->epfd, op, fd, &ev) < 0 && (op != EPOLL_CTL_ADD || errno != EEXIST))
                break;
            if (op == EPOLL_CTL_ADD) {
                _st_epoll_data->evtlist_cnt++;
                if (_st_epoll_data->evtlist_cnt > _st_epoll_data->evtlist_size)
                    _st_epoll_evtlist_expand();
            }
        }

TRANS_BY_GPT4

@winlinvip winlinvip changed the title 关于ST中如何支持EPOLLET问题 About How to Support EPOLLET Issue in ST Aug 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants