connection: add syncronous message reply mechanism
authorDaniel Mack <zonque@gmail.com>
Fri, 17 Jan 2014 22:03:32 +0000 (23:03 +0100)
committerDaniel Mack <zonque@gmail.com>
Fri, 17 Jan 2014 22:33:33 +0000 (23:33 +0100)
commit999181ed7e0b24d02e0fd939300b13fc81184eda
tree3ff939e730932bcd0b7df7709b40507909431b44
parente6516d1617e66e5d75c00aab9458e8a43e10f661
connection: add syncronous message reply mechanism

Sending a message with (KDBUS_MSG_FLAGS_EXPECT_REPLY |
KDBUS_MSG_FLAGS_SYNC_REPLY) will result in the KDBUS_CMD_MSG_SEND ioctl
will block until the receiving connection has replied or the specified
timeout is hit.

When the round-trip succeeded, .offset_reply in the sender's message is
set to the offset where the reply can be found, and the message is
accepted and received automatically. The sender is still in charge of
freeing the message though.

This breaks with Greg's original matra that we followed elsewhere
in the design of kbus: "nothing blocks, ever". But hey, it an optional
feature after all :)
connection.c
handle.c