浅谈Service Manager成为Android进程间通信(IPC)机制Binder守护进程之路(2)
继续分析这个函数之前,又要解释两个数据结构了,一个是struct binder_thread结构体,顾名思久,它表示一个线程,这里就是执行binder_become_context_manager函数的线程了。 structbinder_thread{ structbinder_proc*proc; structrb_noderb_node; intpid; intlooper; structbinder_transaction*transaction_stack; structlist_headtodo; uint32_treturn_error;/*Writefailed,returnerrorcodeinreadbuf*/ uint32_treturn_error2;/*Writefailed,returnerrorcodeinread*/ /*buffer.Usedwhensendingareplytoadeadprocessthat*/ /*wearealsowaitingon*/ wait_queue_head_twait; structbinde...