From ea91a51ebe8897772e3d1b45e4405c8f9e2fedb0 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 13 Jul 2017 14:28:30 +0200 Subject: select: Add new osmo_fd_close() function This is a convenience helper that will both close a fd, mark it as closed and unregister it from the event loop abstraction. In most cases, you probably actually want to use it instead of manually closing and calling osmo_fd_unregister(). Change-Id: Icd0933eed6a24edde7cdcb378e138897ecc5332c --- include/osmocom/core/select.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/osmocom') diff --git a/include/osmocom/core/select.h b/include/osmocom/core/select.h index 9b5f372b..2abda2dc 100644 --- a/include/osmocom/core/select.h +++ b/include/osmocom/core/select.h @@ -39,6 +39,7 @@ struct osmo_fd { bool osmo_fd_is_registered(struct osmo_fd *fd); int osmo_fd_register(struct osmo_fd *fd); void osmo_fd_unregister(struct osmo_fd *fd); +void osmo_fd_close(struct osmo_fd *fd); int osmo_select_main(int polling); struct osmo_fd *osmo_fd_get_by_fd(int fd); -- cgit v1.2.3