eal: introduce internal wrappers for file operations
authorDmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Mon, 15 Jun 2020 00:43:44 +0000 (03:43 +0300)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 15 Jun 2020 17:24:37 +0000 (19:24 +0200)
commit176bb37ca6f344e6765d0ce4b99b88950b618ce1
tree7063ba32e3c4861df9a3f13f90075a52f99ec101
parent67a661ed8536a383fb070f3ca9e0c790386236f8
eal: introduce internal wrappers for file operations

Introduce OS-independent wrappers in order to support common EAL code
on Unix and Windows:

* eal_file_open: open or create a file.
* eal_file_lock: lock or unlock an open file.
* eal_file_truncate: enforce a given size for an open file.

Implementation for Linux and FreeBSD is placed in "unix" subdirectory,
which is intended for common code between the two. These thin wrappers
require no special maintenance.

Common code supporting multi-process doesn't use the new wrappers,
because it is inherently Unix-specific and would impose excessive
requirements on the wrappers.

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
MAINTAINERS
lib/librte_eal/common/eal_common_fbarray.c
lib/librte_eal/common/eal_private.h
lib/librte_eal/freebsd/Makefile
lib/librte_eal/linux/Makefile
lib/librte_eal/meson.build
lib/librte_eal/unix/eal_file.c [new file with mode: 0644]
lib/librte_eal/unix/meson.build [new file with mode: 0644]