Commit 87102955 authored by Daniel Krebs's avatar Daniel Krebs

make linking of the lib work by using old C-symbols until replaced

parent 615ca015
......@@ -44,6 +44,10 @@
#include "fpga/ips/dft.h"
#include "fpga/ips/intc.h"
#ifdef __cplusplus
extern "C" {
#endif
enum fpga_ip_types {
FPGA_IP_TYPE_DM_DMA, /**< A datamover IP exchanges streaming data between the FPGA and the CPU. */
FPGA_IP_TYPE_DM_FIFO, /**< A datamover IP exchanges streaming data between the FPGA and the CPU. */
......@@ -115,5 +119,8 @@ int fpga_ip_reset(struct fpga_ip *c);
/** Find a registered FPGA IP core type with the given VLNV identifier. */
struct fpga_ip_type * fpga_ip_type_lookup(const char *vstr);
#ifdef __cplusplus
}
#endif
/** @} */
......@@ -28,6 +28,10 @@
#ifndef _FPGA_VLNV_H_
#define _FPGA_VLNV_H_
#ifdef __cplusplus
extern "C" {
#endif
/* Forward declarations */
struct list;
......@@ -50,4 +54,8 @@ int fpga_vlnv_parse(struct fpga_vlnv *c, const char *vlnv);
/** Release memory allocated by fpga_vlnv_parse(). */
int fpga_vlnv_destroy(struct fpga_vlnv *v);
#ifdef __cplusplus
}
#endif
#endif /** _FPGA_VLNV_H_ @} */
......@@ -37,7 +37,6 @@ class FpgaVlnv {
public:
static constexpr char delimiter = ':';
static constexpr char wildcard[] = "*";
FpgaVlnv() :
vendor(""), library(""), name(""), version("") {}
......
......@@ -28,6 +28,10 @@
#include <string.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Forward declarations */
struct version;
......@@ -87,4 +91,8 @@ int kernel_get_hugepage_size();
/** Set SMP affinity of IRQ */
int kernel_irq_setaffinity(unsigned irq, uintmax_t affinity, uintmax_t *old);
#ifdef __cplusplus
}
#endif
/** @} */
......@@ -20,6 +20,10 @@
#define VFIO_DEV(x) "/dev/vfio/" x
#ifdef __cplusplus
extern "C" {
#endif
/* Forward declarations */
struct pci_device;
......@@ -109,4 +113,8 @@ int vfio_unmap_dma(struct vfio_container *c, uint64_t virt, uint64_t phys, size_
/** munmap() a region which has been mapped by vfio_map_region() */
int vfio_unmap_region(struct vfio_device *d, int idx);
#ifdef __cplusplus
}
#endif
/** @} */
set(SOURCES
ip.cpp
ip.c
vlnv.cpp
vlnv.c
card.c
ips/timer.c
......@@ -17,6 +19,7 @@ set(SOURCES
kernel/pci.c
kernel/vfio.c
plugin.c
plugin.cpp
utils.c
list.c
......
......@@ -35,6 +35,9 @@
namespace villas {
// instantiate factory to make available to plugin infrastructure
static InterruptControllerFactory factory;
InterruptController::~InterruptController()
{
vfio_pci_msi_deinit(&card->vfio_device , this->efds);
......
......@@ -39,6 +39,7 @@
#endif
struct log *global_log;
struct log default_log;
/* We register a default log instance */
__attribute__((constructor))
......
......@@ -59,10 +59,10 @@ FpgaVlnv::parseFromString(std::string vlnv)
std::getline(sstream, version, delimiter);
// represent wildcard internally as empty string
if(vendor == wildcard) vendor = "";
if(library == wildcard) library = "";
if(name == wildcard) name = "";
if(version == wildcard) version = "";
if(vendor == "*") vendor = "";
if(library == "*") library = "";
if(name == "*") name = "";
if(version == "*") version = "";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment