History

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.

Martijn Coenen committed 8 years ago

Commit b7e6a891 parent 6b6642d2 files · +65 −0Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/android/binder.h+10−0
@@ -200,6 +200,15 @@ struct binder_node_debug_info { · 199 unmodified lines
200 __u32 has_weak_ref;200 __u32 has_weak_ref;
201};201};
202 202
203struct 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 { · 2 unmodified lines
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 calling223 * NOTE: Two special error codes you should check for when calling

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t