ossrs / ossrs/state-threads

About How to Support EPOLLET Issue in ST

Open
#32 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

TransByAI
Dominant language
C++
Stars
759
Forks
277
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the ST event-loop code containing the shown epoll_ctl call and review how event flags are currently registered. Confirm the expected EPOLLET behavior in the usage scenario, then verify that the change works with the relevant native epoll flow; the issue does not name a test or file to run.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.