kdbus.txt, Changelog: document KDBUS_ITEM_CANCEL_FD
authorDaniel Mack <daniel@zonque.org>
Fri, 19 Dec 2014 18:44:41 +0000 (19:44 +0100)
committerDaniel Mack <daniel@zonque.org>
Fri, 19 Dec 2014 18:44:41 +0000 (19:44 +0100)
Signed-off-by: Daniel Mack <daniel@zonque.org>
Changelog
kdbus.txt

index 22f7e379956c71416d9c40c8af6825f1de411987..3232c64730aae5eba6055e3ef915e25c9f802bf5 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -22,7 +22,10 @@ since v2:
     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
 
index 533d74e94d76ba3b127aeadd8e6f5f19b373e9c3..4a1e9676d514ceb303d54ae4d13d9a31cf7da087 100644 (file)
--- a/kdbus.txt
+++ b/kdbus.txt
@@ -833,6 +833,15 @@ struct kdbus_cmd_send {
       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.
 };