Skip to content

Commit

Permalink
eventdev: add missing C++ guards
Browse files Browse the repository at this point in the history
[ upstream commit 2c552933ba453984c26262136150d75235f6aabe ]

Some public header files were missing 'extern "C"' C++ guards,
and couldn't be used by C++ applications. Add the missing guards.

Fixes: dc39e2f ("eventdev: add ring structure for events")
Fixes: 7a33572 ("lib: remove C++ include guard from private headers")

Signed-off-by: Brian Dooley <brian.dooley@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
  • Loading branch information
bdoole1 authored and cpaelzer committed Mar 9, 2022
1 parent 49abae5 commit 5d5711a
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/librte_eventdev/rte_event_ring.h
Expand Up @@ -13,6 +13,10 @@
#ifndef _RTE_EVENT_RING_
#define _RTE_EVENT_RING_

#ifdef __cplusplus
extern "C" {
#endif

#include <stdint.h>

#include <rte_common.h>
Expand Down Expand Up @@ -275,4 +279,9 @@ rte_event_ring_get_capacity(const struct rte_event_ring *r)
{
return rte_ring_get_capacity(&r->r);
}

#ifdef __cplusplus
}
#endif

#endif
8 changes: 8 additions & 0 deletions lib/librte_eventdev/rte_eventdev_pmd.h
Expand Up @@ -5,6 +5,10 @@
#ifndef _RTE_EVENTDEV_PMD_H_
#define _RTE_EVENTDEV_PMD_H_

#ifdef __cplusplus
extern "C" {
#endif

/** @file
* RTE Event PMD APIs
*
Expand Down Expand Up @@ -1112,4 +1116,8 @@ rte_event_pmd_release(struct rte_eventdev *eventdev);
}
#endif

#ifdef __cplusplus
}
#endif

#endif /* _RTE_EVENTDEV_PMD_H_ */
4 changes: 4 additions & 0 deletions lib/librte_eventdev/rte_eventdev_pmd_pci.h
Expand Up @@ -5,6 +5,10 @@
#ifndef _RTE_EVENTDEV_PMD_PCI_H_
#define _RTE_EVENTDEV_PMD_PCI_H_

#ifdef __cplusplus
extern "C" {
#endif

/** @file
* RTE Eventdev PCI PMD APIs
*
Expand Down
4 changes: 4 additions & 0 deletions lib/librte_eventdev/rte_eventdev_pmd_vdev.h
Expand Up @@ -5,6 +5,10 @@
#ifndef _RTE_EVENTDEV_PMD_VDEV_H_
#define _RTE_EVENTDEV_PMD_VDEV_H_

#ifdef __cplusplus
extern "C" {
#endif

/** @file
* RTE Eventdev VDEV PMD APIs
*
Expand Down

0 comments on commit 5d5711a

Please sign in to comment.