summaryrefslogtreecommitdiff
path: root/ot_fdstate.h
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2026-10-26 16:37:55 +0100
committerDirk Engling <erdgeist@erdgeist.org>2026-10-26 16:37:55 +0100
commit5e86efde052760a53ca92ddd411db095fcf4a970 (patch)
treec538485595c26bc7c47ea281667d0652448fddf3 /ot_fdstate.h
parent0194b1b8a00d6646f03291e6045918aaaf7cfdc4 (diff)
Use new fdstate subsystem to store per fd cookie and timeout
Diffstat (limited to 'ot_fdstate.h')
-rw-r--r--ot_fdstate.h5
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. */
46void fdstate_close(int fd); 46void 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. */
51int 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. */
49void *fdstate_cookie(int fd); 54void *fdstate_cookie(int fd);
50void fdstate_set_expiry(int fd, ot_time expiry); 55void fdstate_set_expiry(int fd, ot_time expiry);