diff options
Diffstat (limited to 'src/ot_fdstate.h')
| -rw-r--r-- | src/ot_fdstate.h | 8 |
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. */ |
| 30 | uint32_t fdstate_open(int fd, void *cookie, ot_time expiry); | 30 | uint32_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. */ |
| 43 | int fdstate_claim_expired(int fd, ot_time now); | 43 | int 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. */ |
| 53 | int fdstate_next_expired(ot_time now, int *cursor); | 53 | int 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. */ |
| 56 | void *fdstate_cookie(int fd); | 56 | void *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 */ |
| 59 | void fdstate_set_cookie(int fd, void *cookie); | 59 | void fdstate_set_cookie(int fd, void *cookie); |
| 60 | void fdstate_set_expiry(int fd, ot_time expiry); | 60 | void fdstate_set_expiry(int fd, unsigned long expiry); |
| 61 | 61 | ||
| 62 | #endif | 62 | #endif |
