px4::init_once();
px4::init(argc, argv, "px4");
画了一个px4。
阅读(10) | 评论(0) | 转发(0) |
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
- void init_once()
- {
- _shell_task_id = pthread_self(); //获取自生PID
- //printf("[init] shell id: %lu\n", (unsigned long)_shell_task_id);
- work_queues_init(); //工作队列初始化? 创建了一个高优先级和一个低优先级工作线程
- hrt_work_queue_init(); //创建了一个最高优先级的工作队列?
- hrt_init(); //初始化了hrt信号量?
- param_init(); //初始化了param_sem和reader_lock_holders_lock信号量
-
- #ifdef CONFIG_SHMEM
- PX4_DEBUG("Syncing params to shared memory\n");
- init_params();
- #endif
- }
画了一个px4。
- void init(int argc, char *argv[], const char *app_name)
- {
- printf("\n");
- printf("______ __ __ ___ \n");
- printf("| ___ \\ \\ \\ / / / |\n");
- printf("| |_/ / \\ V / / /| |\n");
- printf("| __/ / \\ / /_| |\n");
- printf("| | / /^\\ \\ \\___ |\n");
- printf("\\_| \\/ \\/ |_/\n");
- printf("\n");
- printf("%s starting.\n", app_name);
- printf("\n");
-
- // set the threads name
- #ifdef __PX4_DARWIN
- (void)pthread_setname_np(app_name);
- #else
- (void)pthread_setname_np(pthread_self(), app_name);
- #endif
- }
给主人留下些什么吧!~~
评论热议