码迷,mamicode.com
首页 > 编程语言 > 详细

Bluedroid协议栈HCI线程数据处理流程分析

时间:2018-06-21 23:44:12      阅读:357      评论:0      收藏:0      [点我收藏+]

标签:enable   协议栈   cti   workqueue   col   name   tin   ...   工作   

在蓝牙enable的过程中会进行多个线程的创建以及将线程与队列进行绑定的工作。该篇文章主要分析一下处理hci数据这个 线程。

void BTU_StartUp(void)
{
...
    btu_bta_msg_queue = fixed_queue_new(SIZE_MAX);

    btu_general_alarm_hash_map = hash_map_new(BTU_GENERAL_ALARM_HASH_MAP_SIZE,
            hash_function_pointer, NULL, (data_free_fn)alarm_free, NULL);

    btu_general_alarm_queue = fixed_queue_new(SIZE_MAX);
    btu_oneshot_alarm_hash_map = hash_map_new(BTU_ONESHOT_ALARM_HASH_MAP_SIZE,
            hash_function_pointer, NULL, (data_free_fn)alarm_free, NULL);

    btu_oneshot_alarm_queue = fixed_queue_new(SIZE_MAX);

    btu_l2cap_alarm_hash_map = hash_map_new(BTU_L2CAP_ALARM_HASH_MAP_SIZE,
            hash_function_pointer, NULL, (data_free_fn)alarm_free, NULL);

    btu_l2cap_alarm_queue = fixed_queue_new(SIZE_MAX);

    bt_workqueue_thread = thread_new(BT_WORKQUEUE_NAME);//该线程为处理各个task 的线程,之后会与多个队列绑定
// Continue startup on bt workqueue thread. thread_post(bt_workqueue_thread, btu_task_start_up, NULL);//在bt_workqueue_thread中继续startup的工作
return; 
}

 

Bluedroid协议栈HCI线程数据处理流程分析

标签:enable   协议栈   cti   workqueue   col   name   tin   ...   工作   

原文地址:https://www.cnblogs.com/libs-liu/p/9211278.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!