android (a)

Process::self()

  1. Open the binder drive

  2. Use of mmap fd returned for the binder to open up memory space for your data.

defaultServiceManager();

  1. Create a Bpbinder, handler = 0. (Because the service as a client to interact with servicemanager .Bpbinder-> client, Bbbindr-> server, Bpbinder find Bbbinder by the handler identifier)

  2.defaultServiceManager returns BpServiceManager, its value is mRemote Bpbinder, and implement business logic BpServiceManager of IServiceManager

IPCThreadState:

  1. Each thread has a IPCThreadState, each IPCThreadState: has a mIn, mOut.mIn binder to the data receiving apparatus, mOut binder used to keep the data sent

 

Service for the service of threads:

  Thread 1.startThreadPool newly created binder device is read by joinThreadPool, to see if there is a request

  2. The main thread also calls joinThreadPool read binder device to see if there is a request

Guess you like

Origin www.cnblogs.com/jobs1/p/12022476.html