摘要 |
System resources are automatically assigned by a single resource conflict resolver to all functions on expansion buses in a computer system. Such system resources include, but are not limited to, memory ranges, input-output (I/O) register ranges, interrupt request lines and direct memory access (DMA) channels. Generally, the assignment is exclusive, however, in some cases, the assignment may be shared so that one or more resources will be shared between different functions. In order to prevent contention between two functions for the same resource, classes are provided which classes can be instantiated to construct resource lock objects. The resource lock objects provide an access control mechanism to synchronize access to the resources among the devices that use and, possibly, share the resources. The lock object contains methods which retrieve the resource assignments for an I/O function and acquire a lock on the resources. The lock object can be used by device drivers to first retrieve the resource assignments from the hardware configuration database and then acquire access to the resources assigned to an I/O function. The acquired access can be either exclusive or shared.
|