I'm writing a simple character device driver for Linux with blocking read() and write().
What I want to do is to set them as cancellation points, so that calling a pthread_cancel on a thread suspended on these functions will cause it to terminate.
How is it possible to set them as cancellation points?
Thanks in advance.
If you're writing the kernel driver, all you need to do to make sure that
write() correctly function as cancellation points for userspace is to ensure that they return immediately if a signal is raised on the process while it's waiting in kernel space (either with a short item count or the
This generally means using
wait_event_interruptible() followed by a check for