numam-dpdk/drivers/bus/vdev/vdev_private.h
Dmitry Kozlyuk 45d62067c2 eal: make OS shims internal
DPDK code often relies on functions and macros that are not standard C,
but are found on all platforms, even if by slightly different names.
Windows <rte_os.h> provided macros or inline definitions for such symbols.
However, when placed in public header, these symbols were unnecessarily
exposed, breaking consumer POSIX compatibility code.

Move most of the shims to <rte_os_shim.h>, a header to be used instead
of <rte_os.h> by internal code. Include it in libraries and PMDs that
previously imported shims from <rte_os.h>. Directly replace shims that
were only used inside EAL:
* index -> strchr, rindex -> strrchr
* sleep -> rte_delay_us_sleep
* strerror_r -> strerror_s

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
2021-04-15 01:56:20 +02:00

29 lines
495 B
C

/* SPDX-License-Identifier: BSD-3-Clause
* Copyright 2018 Gaëtan Rivet
*/
#ifndef _VDEV_PRIVATE_H_
#define _VDEV_PRIVATE_H_
#include <rte_os_shim.h>
#ifdef __cplusplus
extern "C" {
#endif
struct rte_device *
rte_vdev_find_device(const struct rte_device *start,
rte_dev_cmp_t cmp,
const void *data);
void *
rte_vdev_dev_iterate(const void *start,
const char *str,
const struct rte_dev_iterator *it);
#ifdef __cplusplus
}
#endif
#endif /* _VDEV_PRIVATE_H_ */