diff options
| author | Martijn Coenen <maco@android.com> | 2018-09-07 09:38:37 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-09-14 09:22:48 -0400 |
| commit | b7e6a8961b5d6dd3fc535970e65d497d868bb49f (patch) | |
| tree | 97e6dda19380e653059e478ba9102963132df713 /include/uapi/linux | |
| parent | 6b6642dadd685af885367d6e30f18553e2a23b22 (diff) | |
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')
| -rw-r--r-- | include/uapi/linux/android/binder.h | 10 |
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 { | |||
| 200 | __u32 has_weak_ref; | 200 | __u32 has_weak_ref; |
| 201 | }; | 201 | }; |
| 202 | 202 | ||
| 203 | struct binder_node_info_for_ref { | ||
| 204 | __u32 handle; | ||
| 205 | __u32 strong_count; | ||
| 206 | __u32 weak_count; | ||
| 207 | __u32 reserved1; | ||
| 208 | __u32 reserved2; | ||
| 209 | __u32 reserved3; | ||
| 210 | }; | ||
| 211 | |||
| 203 | #define BINDER_WRITE_READ _IOWR('b', 1, struct binder_write_read) | 212 | #define BINDER_WRITE_READ _IOWR('b', 1, struct binder_write_read) |
| 204 | #define BINDER_SET_IDLE_TIMEOUT _IOW('b', 3, __s64) | 213 | #define BINDER_SET_IDLE_TIMEOUT _IOW('b', 3, __s64) |
| 205 | #define BINDER_SET_MAX_THREADS _IOW('b', 5, __u32) | 214 | #define BINDER_SET_MAX_THREADS _IOW('b', 5, __u32) |
| @@ -208,6 +217,7 @@ struct binder_node_debug_info { | |||
| 208 | #define BINDER_THREAD_EXIT _IOW('b', 8, __s32) | 217 | #define BINDER_THREAD_EXIT _IOW('b', 8, __s32) |
| 209 | #define BINDER_VERSION _IOWR('b', 9, struct binder_version) | 218 | #define BINDER_VERSION _IOWR('b', 9, struct binder_version) |
| 210 | #define BINDER_GET_NODE_DEBUG_INFO _IOWR('b', 11, struct binder_node_debug_info) | 219 | #define BINDER_GET_NODE_DEBUG_INFO _IOWR('b', 11, struct binder_node_debug_info) |
| 220 | #define BINDER_GET_NODE_INFO_FOR_REF _IOWR('b', 12, struct binder_node_info_for_ref) | ||
| 211 | 221 | ||
| 212 | /* | 222 | /* |
| 213 | * NOTE: Two special error codes you should check for when calling | 223 | * NOTE: Two special error codes you should check for when calling |
