Android-driven learning-internal mechanism review Binder framework key points

Source: Internet
Author: User

Internal mechanism _ Review Binder framework key points
When the server registers the service, it provides different ptr/cookie for each service.
The driver constructs a binder_node for each service, and it also contains Ptr/cookie

Client must first GetService before using the service: it constructs a binder_ref in the driver,
BINDER_REF contains DESC, node member, DESC is an integer, node points to the binder_node of the corresponding service

When using the service, the client constructs the data and invokes the IOCTL: the data contains handle

The driver finds Binder_ref (Desc==handle) based on handle, finds Binder_node, and then finds the server,
Remove Ptr/cookie from Binder_node and send the data to the server

Server according to Ptr/cookie know which service to invoke, ....

The core function: IOCTL
The core data of the client is: handle
The core data for the server is: Ptr/cookie

Android-driven learning-internal mechanism review Binder framework key points

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.