The RIL is divided into two separate components, a RIL Driver and a RIL Proxy. The RIL Driver processes radio commands and events. The RIL Proxy performs arbitration between multiple clients for access to the single RIL driver.
When a module first registers with the RIL, it passes in two callback functions. One is used for unsolicited notifications, and the other is used for responses to function calls. For example, when the phone receives a new incoming call, the RIL uses the unsolicited notification callback to notify each module about the incoming call.
When a module calls the RIL to get the signal strength, the function call immediately returns a response identifier. The RIL uses the function response callback to convey signal strength information to the module. To ensure that response callbacks are correctly matched with function calls, this callback structure also contains the same response identifier value that is returned by the original function call. This asynchronous architecture simplifies the RIL implementation. If a module needs to call a RIL function in a synchronous manner, it needs to make the function call and block until the module receives the function response callback.