threaded userspace implementation due to inherit races. Instead,
add an item type KDBUS_ITEM_SIGMASK to store a sigmask that is
set before the sync SEND ioctl puts the task to sleep, and restore
- it afterwards, similar to ppoll().
+ it afterwards, similar to ppoll(). Also add an item type CANCEL_FD
+ which can be used to pass a file descriptor to the CMD_SEND ioctl.
+ When the SEND is done synchronously, writing to this fd from
+ another thread will cancel the blocking operation.
* Dropped startttime from KDBUS_ITEM_PIDS
putting it to sleep, and restored afterwards. For asynchronous message
sending, this item is accepted but ignored.
+ KDBUS_ITEM_CANCEL_FD
+ When this optional item is passed in, and the call is executed as SYNC
+ call, the passed in file descriptor can be used as alternative
+ cancellation point. The kernel will call poll() on this file descriptor,
+ and if it reports any incoming bytes, the blocking send operation will
+ be canceled, and the call will return -ECANCELED. Any type of file
+ descriptor that implements poll() can be used as payload to this item.
+ For asynchronous message sending, this item is accepted but ignored.
+
All other items are rejected, and the ioctl will fail with -EINVAL.
};