Synchronization mechanism between wait_for_completion_interruptible_timeout() & complete()

From: Naveen Kumar Parna
Date: Wed Mar 04 2015 - 08:16:48 EST


Hello,

I have a question regarding the synchronization mechanism between
wait_for_completion_interruptible_timeout() & complete(). I used
complete() API in the ISR Tx interrupt path and
wait_for_completion_interruptible_timeout() in struct file_operations
.write method.

Let assume a scenario in which Tx interrupt occurred and ISR called
complete() API before any process actually blocked at write method on
wait_for_completion_interruptible_timeout().

After a few milli seconds, a process called write() API. Does it gets
blocked on wait_for_completion_interruptible_timeout() for completion
of a specific task to be signaled from new Tx interrupt?


Thanks,
Naveen
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/