SeviceManager启动
2020-03-02 22:19:51 9 举报
登录查看完整内容
ServiceManager启动
作者其他创作
大纲/内容
处理完成发送BC_REPLY
binder_procs
用户空间
init进程解析init.rc文件
binder_loop()
open()
binder_init()
loop: 不断发送命令BINDER_WRITE_READ,接收Client的请求
BINDER_SET_CONTEXT_MGR
返回结果给Client 发送BR_REPLY
do_find_service()
copy_to_user()
Binder驱动
Syscall
mmap()
创建数据接收缓存区
创建binder_node并插入链表
内存映射
不断处理BR_XXX命令
binder_mmap()
binder_become_context_manager()
main()
BINDER_WRITE_READ
do_add_service()
binder_ioctl()
frameworks/native/cmds/servicemanager/中的binder.c封装了与Binder驱动交互的方法
binder_open()
不断读写数据
service_manager.c
copy_from_user()
binder.c
创建全局链表
内核空间
ioctl()
2. 设置为SMgr
3. 进入loop
1.打开binder驱动
建立内核空间和用户空间的缓存区的内存映射关系
binder_parse()
收藏
收藏
0 条评论
回复 删除
下一页