irq_work 在实际工程应用的例子是,在手机出现卡屏卡死状态时,可以使用组合按键触发 irq_work 来 dump 系统信息,而避免使用进程调度,因为此时系统可能资源匮乏、锁竞争让执行 dump 系统信息的进程处于 D 状态无法正常调度工作,导致操作失效,失去分析现场的机会。
[...] The buggy address belongs to the object at 000000006d640800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 584 bytes inside of freed 1024-byte region [000000006d640800, 000000006d640c00) Add the appropriate irq_work_sync() so the work finishes ...
}staticvoidkey_work_func(structwork_struct *work){structgpio_key*gpio_key=container_of(work,structgpio_key, work);intval; val = gpiod_get_value(gpio_key->gpiod); printk("key_work_func: the process is %s pid %d\n",current->comm, current->pid); printk("key_work_func key %d %d\n...
However, IRQ sharing is still commonplace among USB and Firewire devices, and it doesn't prevent us from plugging multiple devices into USB hubs or connecting chains of Firewire peripherals, and without too many problems, which proves that IRQ sharing can work. In fact, I haven't heard of...
work 来线程化地处理中止,一个 worker 线程只能由一个 CPU 履行,多个中止的 work 都由同一个 ...
_WORK_BUSY; } bool irq_work_queue(struct irq_work *work); bool irq_work_queue_on(struct irq_work *work, int cpu); void irq_work_tick(void); void irq_work_sync(struct irq_work *work); #ifdef CONFIG_IRQ_WORK #include <asm/irq_work.h> void irq_work_run(void...
static void ltr559_ps_work_func(struct work_struct *work) { struct ltr559_data *data = container_of(work, struct ltr559_data, ps_work.work); struct i2c_client *client=data->client; int als_ps_status; int psval_lo, psval_hi, psdata; ...
chip_bus_sync_unlock(desc); mutex_unlock(&desc->request_mutex); irq_setup_timings(desc, new); /* * Strictly no need to wake it up, but hung_task complains * when no hard interrupt wakes the thread up. */ # 如果有中断线程的话,则wakeup线程 ...
nested) { ret = setup_irq_thread(new, irq, false); if (ret) goto out_mput; if (new->secondary) { ret = setup_irq_thread(new->secondary, irq, true); if (ret) goto out_thread; } } /* * Drivers are often written to work w/o knowledge about the * underlying irq chip ...
wait_task_continued Handle do_wait work for one task in a live, non-stopped state.* read_lock(&tasklist_lock) on entry. If we return zero, we still hold* the lock and this task is uninteresting. If we return nonzero, we have ...