wake_up_interruptible() is not waking up the processes sleeping on condition
问题 I am writing a sleepy driver. Here any process that tries to write to the device file should sleep for 'n' number of seconds supplied by the user. Reader process should wake up all the waiting processes. Writer code : printk("Invoking interruptible_timeout for device flag[%d] = %d\n", idn, flag[idn]); long ret = wait_event_interruptible_timeout(wq[idn],flag[idn]==1,sec*HZ)/HZ; //flag[idn]=0; printk("timeout returned : %d idn = %d\n", ret, idn) printk("writer : flag[%d] = %d\n", idn, flag[idn]