Hello,
My device driver will sleep on wait_event_interruptible() function. With testing, I noticed that it is waked up by a signal.
Code:
if (wait_event_interruptible(my_queue, myCondition) == -ERESTARTSYS)
{
printk(KERN_ERR "sig[0] is 0x%08x, sig[1] is 0x%08x\n",
current->pending.signal.sig[0],
current->pending.signal.sig[1]);
return -ERESTARTSYS;
}
I know that the sig[0] is the normal signal, for example 0x02 is SIGINT for Ctrl-C. In my case, I get: "sig[0] is 0x00000000, sig[1] is 0x00000001" I'm wondering what's in sig[1]? And why are there 2 signals?
The background of my driver:
The driver is for the i2c device which works with interrupt. It's works fine in most time. When I testing it with multithread, very frequency i2c access functions, it receives the unknown (for me
) signal.
The driver is in an embedded system. I debug it through serial port. So only one console for it. And I didn't press any key when it received the unknown signal.
Thanks,
lordofring