Code Review
/
odp4vpp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
7d27218
)
vlib: add unix_file_del_by_index function
author
Damjan Marion
<damarion@cisco.com>
Mon, 5 Jun 2017 19:54:46 +0000
(21:54 +0200)
committer
Florin Coras
<florin.coras@gmail.com>
Mon, 5 Jun 2017 23:40:05 +0000
(23:40 +0000)
Change-Id: I9eca5f9d1c1ae62d5ba5fb36f2f97434dbaf334e
Signed-off-by: Damjan Marion <damarion@cisco.com>
src/vlib/unix/unix.h
patch
|
blob
|
history
diff --git
a/src/vlib/unix/unix.h
b/src/vlib/unix/unix.h
index
ea0d417
..
de607c0
100644
(file)
--- 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)