μHAL
pcie-defs.h
Go to the documentation of this file.
1
5
#ifndef PCIE_STRUCT_H
6
#define PCIE_STRUCT_H
7
8
#include <stdio.h>
9
#include <pthread.h>
10
#include <stdint.h>
11
#include <sys/types.h>
12
13
enum
bar_lock {
14
BAR2,
15
BAR4,
16
NUM_LOCKS,
17
};
18
19
struct
pcie_bars
{
20
volatile
void
*bar0;
21
volatile
void
*bar2;
22
volatile
void
*bar4;
23
24
size_t
sizes[3];
25
26
/* private fields */
27
uint32_t last_bar4_page;
/* protected by locks[BAR4] */
28
29
/* we only need locking for bar2 and bar4, since they are paged.
30
* these mutexes MUST be initialized as recursive */
31
pthread_mutex_t locks[NUM_LOCKS];
32
33
FILE *fserport;
34
};
35
36
#endif
pcie_bars
Definition:
pcie-defs.h:19
util
pcie-defs.h
Generated by
1.9.4