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.
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -200,6 +200,15 @@ struct binder_node_debug_info { · 199 unmodified lines | ||
| 200 | 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 | 212 | #define BINDER_WRITE_READ _IOWR('b', 1, struct binder_write_read) |
| 204 | 213 | #define BINDER_SET_IDLE_TIMEOUT _IOW('b', 3, __s64) |
| 205 | 214 | #define BINDER_SET_MAX_THREADS _IOW('b', 5, __u32) |
| @@ -208,6 +217,7 @@ struct binder_node_debug_info { · 2 unmodified lines | ||
| 208 | 217 | #define BINDER_THREAD_EXIT _IOW('b', 8, __s32) |
| 209 | 218 | #define BINDER_VERSION _IOWR('b', 9, struct binder_version) |
| 210 | 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 | 223 | * NOTE: Two special error codes you should check for when calling |