diff options
| author | Dirk Engling <erdgeist@erdgeist.org> | 2026-10-26 16:37:55 +0100 |
|---|---|---|
| committer | Dirk Engling <erdgeist@erdgeist.org> | 2026-10-26 16:37:55 +0100 |
| commit | 5e86efde052760a53ca92ddd411db095fcf4a970 (patch) | |
| tree | c538485595c26bc7c47ea281667d0652448fddf3 /ot_fdstate.h | |
| parent | 0194b1b8a00d6646f03291e6045918aaaf7cfdc4 (diff) | |
Use new fdstate subsystem to store per fd cookie and timeout
Diffstat (limited to 'ot_fdstate.h')
| -rw-r--r-- | ot_fdstate.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ot_fdstate.h b/ot_fdstate.h index 2693a3b..88f685d 100644 --- a/ot_fdstate.h +++ b/ot_fdstate.h | |||
| @@ -45,6 +45,11 @@ int fdstate_claim_expired(int fd, ot_time now); | |||
| 45 | quoting the old generation are still in flight. */ | 45 | quoting the old generation are still in flight. */ |
| 46 | void fdstate_close(int fd); | 46 | void fdstate_close(int fd); |
| 47 | 47 | ||
| 48 | /* Walks the table for descriptors that have expired, handing back one at a | ||
| 49 | time until it returns -1. The cursor belongs to the caller, so several | ||
| 50 | sweepers can run without sharing anything. */ | ||
| 51 | int fdstate_next_expired(ot_time now, int *cursor); | ||
| 52 | |||
| 48 | /* Both only valid while the caller holds the descriptor. */ | 53 | /* Both only valid while the caller holds the descriptor. */ |
| 49 | void *fdstate_cookie(int fd); | 54 | void *fdstate_cookie(int fd); |
| 50 | void fdstate_set_expiry(int fd, ot_time expiry); | 55 | void fdstate_set_expiry(int fd, ot_time expiry); |
