MCPcopy Create free account
hub / github.com/ading2210/linuxpdf / devfn_alloc

Function devfn_alloc

tinyemu/pci.c:93–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93static int devfn_alloc(PCIBus *b)
94{
95 int devfn;
96 for(devfn = 0; devfn < 256; devfn += 8) {
97 if (!b->device[devfn])
98 return devfn;
99 }
100 return -1;
101}
102
103/* devfn < 0 means to allocate it */
104PCIDevice *pci_register_device(PCIBus *b, const char *name, int devfn,

Callers 1

pci_register_deviceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected