From a9a54c15e6dd987b87d15e80ce4345760ac247f7 Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Mon, 5 Jun 2017 21:54:46 +0200 Subject: vlib: add unix_file_del_by_index function Change-Id: I9eca5f9d1c1ae62d5ba5fb36f2f97434dbaf334e Signed-off-by: Damjan Marion --- src/vlib/unix/unix.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/vlib/unix/unix.h b/src/vlib/unix/unix.h index ea0d417b..de607c0f 100644 --- a/src/vlib/unix/unix.h +++ b/src/vlib/unix/unix.h @@ -151,6 +151,14 @@ unix_file_del (unix_main_t * um, unix_file_t * f) pool_put (um->file_pool, f); } +always_inline void +unix_file_del_by_index (unix_main_t * um, uword index) +{ + unix_file_t *uf; + uf = pool_elt_at_index (um->file_pool, index); + unix_file_del (um, uf); +} + always_inline uword unix_file_set_data_available_to_write (u32 unix_file_index, uword is_available) -- cgit 1.2.3-korg