librb: make free_fds() public as rb_close_pending_fds()
This commit is contained in:
parent
8f0c3422e7
commit
ad2421c74e
2 changed files with 4 additions and 3 deletions
|
@ -90,6 +90,7 @@ rb_fde_t *rb_open(int, uint8_t, const char *);
|
||||||
void rb_close(rb_fde_t *);
|
void rb_close(rb_fde_t *);
|
||||||
void rb_dump_fd(DUMPCB *, void *xdata);
|
void rb_dump_fd(DUMPCB *, void *xdata);
|
||||||
void rb_note(rb_fde_t *, const char *);
|
void rb_note(rb_fde_t *, const char *);
|
||||||
|
void rb_close_pending_fds(void);
|
||||||
|
|
||||||
/* Type of IO */
|
/* Type of IO */
|
||||||
#define RB_SELECT_READ 0x1
|
#define RB_SELECT_READ 0x1
|
||||||
|
|
|
@ -100,8 +100,8 @@ remove_fd(rb_fde_t *F)
|
||||||
rb_dlinkMoveNode(&F->node, &rb_fd_table[rb_hash_fd(F->fd)], &closed_list);
|
rb_dlinkMoveNode(&F->node, &rb_fd_table[rb_hash_fd(F->fd)], &closed_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
void
|
||||||
free_fds(void)
|
rb_close_pending_fds(void)
|
||||||
{
|
{
|
||||||
rb_fde_t *F;
|
rb_fde_t *F;
|
||||||
rb_dlink_node *ptr, *next;
|
rb_dlink_node *ptr, *next;
|
||||||
|
@ -2239,7 +2239,7 @@ int
|
||||||
rb_select(unsigned long timeout)
|
rb_select(unsigned long timeout)
|
||||||
{
|
{
|
||||||
int ret = select_handler(timeout);
|
int ret = select_handler(timeout);
|
||||||
free_fds();
|
rb_close_pending_fds();
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue