diff options
author | Kay Sievers <kay@vrfy.org> | 2014-01-16 10:35:43 +0100 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2014-01-17 01:38:05 +0100 |
commit | b68bb9eb4e710cc55c1ada175a4f28b8412d8cc5 (patch) | |
tree | 2a9c5294902d2f4b9f866a220f31e2760d8ccd81 /connection.h | |
parent | 6dc8072e533e216b1cbb7f86cee54dc8981659a6 (diff) | |
download | kdbus-bus-b68bb9eb4e710cc55c1ada175a4f28b8412d8cc5.tar.gz kdbus-bus-b68bb9eb4e710cc55c1ada175a4f28b8412d8cc5.tar.bz2 kdbus-bus-b68bb9eb4e710cc55c1ada175a4f28b8412d8cc5.zip |
update RECV ioctl and implement priority queues (ABI break)
Diffstat (limited to 'connection.h')
-rw-r--r-- | connection.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/connection.h b/connection.h index 0a7aaa9cdf0..70162121f5b 100644 --- a/connection.h +++ b/connection.h @@ -29,6 +29,8 @@ * @attach_flags: KDBUS_ATTACH_* flags * @lock: Connection data lock * @msg_list: Queue of messages + * @msg_prio_queue: Tree of messages, sorted by priority + * @prio_highest: Cached entry for highest priority (lowest value) node * @hentry: Entry in ID <-> connection map * @monitor_entry: The connection is a monitor * @names_list: List of well-known names @@ -58,6 +60,8 @@ struct kdbus_conn { u64 attach_flags; struct mutex lock; struct list_head msg_list; + struct rb_root msg_prio_queue; + struct rb_node *msg_prio_highest; struct hlist_node hentry; struct list_head monitor_entry; struct list_head names_list; @@ -86,9 +90,8 @@ struct kdbus_conn *kdbus_conn_ref(struct kdbus_conn *conn); struct kdbus_conn *kdbus_conn_unref(struct kdbus_conn *conn); int kdbus_conn_disconnect(struct kdbus_conn *conn, bool ensure_msg_list_empty); -int kdbus_conn_recv_msg(struct kdbus_conn *conn, __u64 __user *buf); -int kdbus_conn_drop_msg(struct kdbus_conn *conn); -int kdbus_conn_src_msg(struct kdbus_conn *conn, __u64 __user *buf); +int kdbus_conn_recv_msg(struct kdbus_conn *conn, + struct kdbus_cmd_recv __user *recv); int kdbus_cmd_conn_info(struct kdbus_conn *conn, void __user *buf); int kdbus_conn_kmsg_send(struct kdbus_ep *ep, |