
linux内核
文章平均质量分 86
内核知识汇
文游内海
这个作者很懒,什么都没留下…
展开
-
Linux内核--wakeup_source机制流程简介
timer.cstatic void do_init_timer(struct timer_list *timer,void (*func)(struct timer_list *),unsigned int flags,const char *name, struct lock_class_key *key){timer->entry.pprev = NULL;timer->function = func;timer->flags = flags | raw_smp_pr原创 2021-02-02 09:08:50 · 3319 阅读 · 0 评论 -
Linux内核--wait_queue_head机制流程简介
core.cint default_wake_function(wait_queue_entry_t *curr, unsigned mode, int wake_flags,void *key){return try_to_wake_up(curr->private, mode, wake_flags, 1); // wake up a thread}EXPORT_SYMBOL(default_wake_function);wait.h/*A single wait-queue原创 2021-02-02 09:04:50 · 696 阅读 · 0 评论 -
内核completion工作机制
core.cint default_wake_function(wait_queue_entry_t *curr, unsigned mode, int wake_flags,void *key){return try_to_wake_up(curr->private, mode, wake_flags, 1); // wake up a thread}EXPORT_SYMBOL(default_wake_function);wait.h/*A single wait-queue原创 2021-01-04 14:59:57 · 591 阅读 · 0 评论 -
Linux--timer---clockevents init
简单导图如下:clockevents设备结构体:/**struct clock_event_device - clock event device descriptor@event_handler: Assigned by the framework to be called by the low level handler of the event source@set_next_event: set next event function using a clockso原创 2020-12-22 10:46:48 · 344 阅读 · 0 评论 -
Linux--workqueue--delayed_work初探
delayed_work的工作比较简单:1:初始化:INIT_DELAYED_WORK(_work, _func);2:启动:schedule_delayed_work(struct delayed_work *dwork,unsigned long delay);以某TP驱动为例,示意图如下:直接上代码:1:关键结构体:/* * The externally visible workqueue. It relays the issued work items to * the原创 2020-12-22 10:43:54 · 1255 阅读 · 0 评论 -
Linux--workqueue之简要流程及关键结构成员关系图
关键代码流程框图:关键结构成员关系原创 2020-07-01 23:26:34 · 199 阅读 · 0 评论 -
Linux--workqueue之应用实例
如下举例一个通用workqueue的应用过程:1:创建"gdt-event-queue"工作队列 core_data->event_wq = alloc_workqueue(“gdt-event-queue”, WQ_UNBOUND | WQ_HIGHPRI | WQ_CPU_INTENSIVE, 1);2:初始化workstatic void goodix_ts_resume_work(struct work_struct *work){struct goodix_ts_core *co原创 2020-12-22 10:40:42 · 535 阅读 · 0 评论 -
Linux--workqueue之初始化
1:初始化第一步:分配各项数据结构及系统workqueue/**workqueue_init_early - early init for workqueue subsystemThis is the first half of two-staged workqueue subsystem initializationand invoked as soon as the bare basics - memory allocation, cpumasks andidr are up原创 2020-07-19 22:27:20 · 402 阅读 · 0 评论