From 5e86efde052760a53ca92ddd411db095fcf4a970 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Mon, 26 Oct 2026 16:37:55 +0100 Subject: Use new fdstate subsystem to store per fd cookie and timeout --- ot_fdstate.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ot_fdstate.h') 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); quoting the old generation are still in flight. */ void fdstate_close(int fd); +/* Walks the table for descriptors that have expired, handing back one at a + time until it returns -1. The cursor belongs to the caller, so several + sweepers can run without sharing anything. */ +int fdstate_next_expired(ot_time now, int *cursor); + /* Both only valid while the caller holds the descriptor. */ void *fdstate_cookie(int fd); void fdstate_set_expiry(int fd, ot_time expiry); -- cgit v1.3