summaryrefslogtreecommitdiff
path: root/src/ot_fdstate.h
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2026-11-12 22:28:39 +0100
committerDirk Engling <erdgeist@erdgeist.org>2026-11-12 22:28:39 +0100
commitbfef6800268cdcf0b9118d89f1ce7c3541bd0309 (patch)
treec43a44135953914a42dfe9666e85552fa4a35d17 /src/ot_fdstate.h
parent530d3ee20a06f2a128b1eddaf2398011d3f1d119 (diff)
Stop forcing 64 bit variables on 32 bit targets where a long would do just fineHEADmaster
Diffstat (limited to 'src/ot_fdstate.h')
-rw-r--r--src/ot_fdstate.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ot_fdstate.h b/src/ot_fdstate.h
index 60fe070..20f469d 100644
--- a/src/ot_fdstate.h
+++ b/src/ot_fdstate.h
@@ -27,7 +27,7 @@ size_t fdstate_slots(void);
27 27
28/* Take a freshly accepted descriptor into the table and return the 28/* Take a freshly accepted descriptor into the table and return the
29 generation to quote when asking for it back. expiry of 0 never expires. */ 29 generation to quote when asking for it back. expiry of 0 never expires. */
30uint32_t fdstate_open(int fd, void *cookie, ot_time expiry); 30uint32_t fdstate_open(int fd, void *cookie, unsigned long expiry);
31 31
32/* Which generation a descriptor currently carries, to check an event that 32/* Which generation a descriptor currently carries, to check an event that
33 was handed out earlier against the connection living there now. */ 33 was handed out earlier against the connection living there now. */
@@ -40,7 +40,7 @@ void fdstate_release(int fd);
40 40
41/* The cleaner's side of the same thing: takes the descriptor only if nobody 41/* The cleaner's side of the same thing: takes the descriptor only if nobody
42 is working on it and it really has expired. Never waits. */ 42 is working on it and it really has expired. Never waits. */
43int fdstate_claim_expired(int fd, ot_time now); 43int fdstate_claim_expired(int fd, unsigned long now);
44 44
45/* Give the descriptor up. The generation is bumped here, which has to happen 45/* Give the descriptor up. The generation is bumped here, which has to happen
46 before close(2) so that the kernel cannot reissue the number while events 46 before close(2) so that the kernel cannot reissue the number while events
@@ -50,13 +50,13 @@ void fdstate_close(int fd);
50/* Walks the table for descriptors that have expired, handing back one at a 50/* Walks the table for descriptors that have expired, handing back one at a
51 time until it returns -1. The cursor belongs to the caller, so several 51 time until it returns -1. The cursor belongs to the caller, so several
52 sweepers can run without sharing anything. */ 52 sweepers can run without sharing anything. */
53int fdstate_next_expired(ot_time now, int *cursor); 53int fdstate_next_expired(unsigned long now, int *cursor);
54 54
55/* Both only valid while the caller holds the descriptor. */ 55/* Both only valid while the caller holds the descriptor. */
56void *fdstate_cookie(int fd); 56void *fdstate_cookie(int fd);
57 57
58/* Hand the slot a different cookie, for a connection whose state has moved */ 58/* Hand the slot a different cookie, for a connection whose state has moved */
59void fdstate_set_cookie(int fd, void *cookie); 59void fdstate_set_cookie(int fd, void *cookie);
60void fdstate_set_expiry(int fd, ot_time expiry); 60void fdstate_set_expiry(int fd, unsigned long expiry);
61 61
62#endif 62#endif