How correctly wake up process inside interrupt handlers
问题 Briefly, in a read method i check if a variable is 0 and if it's i put the current process to sleep: static ssize_t soc2e_read(struct file *filp, char __user *buf, size_t count, loff_t * ppos) { ... struct soc2e_dev *soc2e = (struct soc2e_dev *)filp->private_data; if (soc2e->bytes == 0) { if (wait_event_interruptible(soc2e->wlist, (soc2e->bytes > 0))) return -ERESTARTSYS; } ... } I must wake up the process in an interrupt handler: static irqreturn_t soc2e_irq_handler(int irq, void *dev) { ...