summaryrefslogtreecommitdiffstats
path: root/include/osmocom
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-07-13 14:28:30 +0200
committerHarald Welte <laforge@gnumonks.org>2017-07-13 16:03:37 +0200
commitea91a51ebe8897772e3d1b45e4405c8f9e2fedb0 (patch)
tree43ede8b00e65f804d551a8bab60f9d5eb2c2b9d3 /include/osmocom
parentaa3ba46e0f9dcfb1236a10f6b8f09b1f33330778 (diff)
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
Diffstat (limited to 'include/osmocom')
-rw-r--r--include/osmocom/core/select.h1
1 files changed, 1 insertions, 0 deletions
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);