aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-06-05 21:54:46 +0200
committerFlorin Coras <florin.coras@gmail.com>2017-06-05 23:40:05 +0000
commita9a54c15e6dd987b87d15e80ce4345760ac247f7 (patch)
tree28b2d1f83fc26d0eef7c6d8c536b62ff9281d724 /src/vlib
parent7d272181746909e7ab3a42baa5e4bb0be3575cc1 (diff)
vlib: add unix_file_del_by_index function
Change-Id: I9eca5f9d1c1ae62d5ba5fb36f2f97434dbaf334e Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib')
-rw-r--r--src/vlib/unix/unix.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/vlib/unix/unix.h b/src/vlib/unix/unix.h
index ea0d417b2b1..de607c0f490 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)