Method and apparatus for intercommunications amongst device drivers
First Claim
Patent Images
1. A computer system architecture, comprising:
- a plurality of device drivers loaded in a kernel of an operating system of a computer, each of the device drivers corresponding to a device presented in the computer;
an application programming interface (API) for coupling the kernel with the plurality of device drivers, wherein in response to a request received from a first instance of a device driver via the API for determining whether a second instance of the device driver is currently loaded, the kernel is toperform a lookup in a data structure to determine whether the data structure stores a second driver handle of a second instance of the device driver, wherein the second driver handle stored in the data structure indicates that the second instance of the device driver has been loaded,return via the API a first driver handle of the first instance of the device driver if the second instance of the device driver has not been loaded, andreturn via the API the second driver handle of the second instance of the device driver if the second instance of the device driver has been loaded, wherein the first driver handle is compared with the second driver handle to determine whether the second instance of the device driver has been loaded; and
a device map maintained by the kernel, the device map having a plurality of entries and each corresponding to a device, wherein the device map includes a first field to store an identifier of a corresponding device and a second field to store a driver handle of a device driver associated with the corresponding device, wherein the device map is accessible by the kernel as part of the API to determine whether an instance of a device driver for a particular device is loaded, wherein the API returns a driver handle of an existing driver specified in a second field of a device, indicating that the existing driver has been loaded, wherein the driver handle returned by the API is examined to determine whether the first driver handle and the driver handle returned by the API are identical, and wherein the kernel is to start the first instance of the driver if the first driver handle and the driver handle returned by the API are identical, and unload the first instance of the driver if the first driver handle and the driver handle returned by the API are different.
0 Assignments
0 Petitions
Accused Products
Abstract
Techniques for intercommunication amongst device drivers are described herein. In one embodiment, an application programming interface (API) is provided by a kernel of an operating system (OS) running within a data processing system. The API is accessible by device drivers associated with multiple devices installed in the system. In response to a request from a first instance of a driver the API, information indicating whether another instance of the same driver is currently started is returned via the API. Other methods and apparatuses are also described.
-
Citations
21 Claims
-
1. A computer system architecture, comprising:
-
a plurality of device drivers loaded in a kernel of an operating system of a computer, each of the device drivers corresponding to a device presented in the computer; an application programming interface (API) for coupling the kernel with the plurality of device drivers, wherein in response to a request received from a first instance of a device driver via the API for determining whether a second instance of the device driver is currently loaded, the kernel is to perform a lookup in a data structure to determine whether the data structure stores a second driver handle of a second instance of the device driver, wherein the second driver handle stored in the data structure indicates that the second instance of the device driver has been loaded, return via the API a first driver handle of the first instance of the device driver if the second instance of the device driver has not been loaded, and return via the API the second driver handle of the second instance of the device driver if the second instance of the device driver has been loaded, wherein the first driver handle is compared with the second driver handle to determine whether the second instance of the device driver has been loaded; and a device map maintained by the kernel, the device map having a plurality of entries and each corresponding to a device, wherein the device map includes a first field to store an identifier of a corresponding device and a second field to store a driver handle of a device driver associated with the corresponding device, wherein the device map is accessible by the kernel as part of the API to determine whether an instance of a device driver for a particular device is loaded, wherein the API returns a driver handle of an existing driver specified in a second field of a device, indicating that the existing driver has been loaded, wherein the driver handle returned by the API is examined to determine whether the first driver handle and the driver handle returned by the API are identical, and wherein the kernel is to start the first instance of the driver if the first driver handle and the driver handle returned by the API are identical, and unload the first instance of the driver if the first driver handle and the driver handle returned by the API are different. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A computer implemented method, comprising:
-
a first instance of a driver calling an application programming interface (API) maintained by a kernel of an operating system, the first instance of the driver being identified via a first driver identifier and loaded by the operating system executed within a data processing system, wherein the kernel is to perform a lookup in a data structure to determine whether the data structure stores another driver handle of a second instance of the driver, wherein the driver handle stored in the data structure indicates that the second instance of the driver has been initialized; in response to a result of calling the API, the first instance of the driver determining whether the second instance of the driver has been initialized by comparing a driver identifier returned from the API against its own driver identifier, wherein the kernel is to return via the API a second driver identifier, the second driver identifier identifying one of the first instance and second instance of the driver; maintaining a device map by the kernel, the device map having a plurality of entries and each corresponding to a device, wherein the device map is accessible by the kernel as part of the API to determine whether an instance of a driver for a particular device is loaded, wherein the device map includes a first field to store an identifier of a corresponding device and a second field to store a driver identifier of a device driver associated with the corresponding device, wherein the API returns a driver identifier of an existing driver specified in a second field of a device, indicating that the existing driver has been loaded; examining the second driver identifier returned by the API to determine whether the first and second driver identifiers are identical; starting the first instance of the driver if the first and second driver identifiers are identical; and unloading the first instance of the driver if the first and second driver identifiers are different. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A non-transitory machine-readable medium having instructions stored therein, which when executed by a machine, cause a machine to perform a method, the method comprising:
-
a first instance of a driver calling an application programming interface (API) maintained by a kernel of an operating system, the first instance of the driver being identified via a first driver identifier, wherein the kernel is to perform a lookup in a data structure to determine whether the data structure stores another driver handle of a second instance of the driver, wherein the driver handle stored in the data structure indicates that the second instance of the driver has been initialized; in response to a result of calling the API, the first instance of the driver determining whether the second instance of the driver has been initialized by comparing a driver identifier returned from the API against its own driver identifier, wherein the kernel is to return via the API a second driver identifier, the second driver identifier identifying one of the first instance and second instance of the driver; maintaining a device map by the kernel, the device map having a plurality of entries and each corresponding to a device, wherein the device map is accessible by the kernel as part of the API to determine whether an instance of a driver for a particular device is loaded, wherein the device map includes a first field to store an identifier of a corresponding device and a second field to store a driver identifier of a device driver associated with the corresponding device, wherein the API returns a driver identifier of an existing driver specified in a second field of a device, indicating that the existing driver has been loaded; examining the second driver identifier returned by the API to determine whether the first and second driver identifiers are identical; starting the first instance of the driver if the first and second driver identifiers are identical; and unloading the first instance of the driver if the first and second driver identifiers are different. - View Dependent Claims (16, 17, 18, 19, 20, 21)
-
Specification