networking · beginner · ~15 min
Filter the epoll event array by a mask.
Implement int count_matching(const unsigned *events, int n, unsigned mask) returning how many event words have at least one bit in mask set.
int count_matching(const unsigned *events, int n, unsigned mask) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.