summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/android
diff options
context:
space:
mode:
authorMartijn Coenen2018-09-07 15:38:37 +0200
committerGreg Kroah-Hartman2018-09-14 15:22:48 +0200
commitb7e6a8961b5d6dd3fc535970e65d497d868bb49f (patch)
tree97e6dda19380e653059e478ba9102963132df713 /include/uapi/linux/android
parentandroid: binder: use kstrdup instead of open-coding it (diff)
downloadkernel-qcow2-linux-b7e6a8961b5d6dd3fc535970e65d497d868bb49f.tar.gz
kernel-qcow2-linux-b7e6a8961b5d6dd3fc535970e65d497d868bb49f.tar.xz
kernel-qcow2-linux-b7e6a8961b5d6dd3fc535970e65d497d868bb49f.zip
binder: Add BINDER_GET_NODE_INFO_FOR_REF ioctl.
This allows the context manager to retrieve information about nodes that it holds a reference to, such as the current number of references to those nodes. Such information can for example be used to determine whether the servicemanager is the only process holding a reference to a node. This information can then be passed on to the process holding the node, which can in turn decide whether it wants to shut down to reduce resource usage. Signed-off-by: Martijn Coenen <maco@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/uapi/linux/android')
-rw-r--r--include/uapi/linux/android/binder.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/uapi/linux/android/binder.h b/include/uapi/linux/android/binder.h
index bfaec6903b8b..b9ba520f7e4b 100644
--- a/include/uapi/linux/android/binder.h
+++ b/include/uapi/linux/android/binder.h
@@ -200,6 +200,15 @@ struct binder_node_debug_info {
__u32 has_weak_ref;
};
+struct binder_node_info_for_ref {
+ __u32 handle;
+ __u32 strong_count;
+ __u32 weak_count;
+ __u32 reserved1;
+ __u32 reserved2;
+ __u32 reserved3;
+};
+
#define BINDER_WRITE_READ _IOWR('b', 1, struct binder_write_read)
#define BINDER_SET_IDLE_TIMEOUT _IOW('b', 3, __s64)
#define BINDER_SET_MAX_THREADS _IOW('b', 5, __u32)
@@ -208,6 +217,7 @@ struct binder_node_debug_info {
#define BINDER_THREAD_EXIT _IOW('b', 8, __s32)
#define BINDER_VERSION _IOWR('b', 9, struct binder_version)
#define BINDER_GET_NODE_DEBUG_INFO _IOWR('b', 11, struct binder_node_debug_info)
+#define BINDER_GET_NODE_INFO_FOR_REF _IOWR('b', 12, struct binder_node_info_for_ref)
/*
* NOTE: Two special error codes you should check for when calling