1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

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

This commit is contained in:
daniel-k 2017-12-05 18:07:10 +01:00
parent 5d4040aded
commit e735c7e248
9 changed files with 42 additions and 5 deletions

View file

@ -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
/** @} */

View file

@ -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_ @} */

View file

@ -37,7 +37,6 @@ class FpgaVlnv {
public:
static constexpr char delimiter = ':';
static constexpr char wildcard[] = "*";
FpgaVlnv() :
vendor(""), library(""), name(""), version("") {}

View file

@ -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
/** @} */

View file

@ -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
/** @} */

View file

@ -1,6 +1,8 @@
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

View file

@ -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);

View file

@ -39,6 +39,7 @@
#endif
struct log *global_log;
struct log default_log;
/* We register a default log instance */
__attribute__((constructor))

View file

@ -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 = "";
}