networking · beginner · ~15 min
Scan poll results for ready fds.
After poll(), each fd has a revents value (0 = nothing). Implement int count_ready(const int *revents, int n) returning how many are non-zero.
int count_ready(const int *revents, int n) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.