Skip to content
Snippets Groups Projects
Commit 6ad3016c authored by Avi Kivity's avatar Avi Kivity
Browse files

interrupt: drop 'using namespace' from header

The whole idea of namespaces is to prevent namespace pollution, using a
"using namespace" in a header negates that.  Remove.
parent 140d7c72
No related branches found
No related tags found
No related merge requests found
......@@ -10,17 +10,15 @@
#include "drivers/pci-function.hh"
#include <osv/types.h>
using namespace pci;
// max vectors per request
const int max_vectors = 256;
class msix_vector {
public:
msix_vector(pci_function* dev);
msix_vector(pci::pci_function* dev);
virtual ~msix_vector();
pci_function* get_pci_function(void);
pci::pci_function* get_pci_function(void);
unsigned get_vector(void);
void msix_unmask_entries(void);
void msix_mask_entries(void);
......@@ -33,7 +31,7 @@ private:
// Handler to invoke...
std::function<void ()> _handler;
// The device that owns this vector
pci_function * _dev;
pci::pci_function * _dev;
// Entry ids used by this vector
std::list<unsigned> _entryids;
unsigned _vector;
......@@ -77,14 +75,14 @@ public:
// 2. Allocate vectors and assign ISRs
// 3. Setup entries
// 4. Unmask interrupts
bool easy_register(pci_function* dev, msix_isr_list& isrs);
void easy_unregister(pci_function* dev);
bool easy_register(pci::pci_function* dev, msix_isr_list& isrs);
void easy_unregister(pci::pci_function* dev);
/////////////////////
// Multi Interface //
/////////////////////
assigned_vectors request_vectors(pci_function* dev, unsigned num_vectors);
assigned_vectors request_vectors(pci::pci_function* dev, unsigned num_vectors);
void free_vectors(const assigned_vectors& vectors);
bool assign_isr(unsigned vector, std::function<void ()> handler);
// Multiple entry can be assigned the same vector
......@@ -96,7 +94,7 @@ private:
static interrupt_manager* _instance;
msix_vector* _vectors[max_vectors];
// Used by the easy interface
std::map<pci_function *, assigned_vectors> _easy_dev2vectors;
std::map<pci::pci_function *, assigned_vectors> _easy_dev2vectors;
};
#endif /* INTERRUPT_HH_ */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment