diff options
Diffstat (limited to 'linux-headers/include/linux/android')
| -rw-r--r-- | linux-headers/include/linux/android/..install.cmd | 2 | ||||
| -rw-r--r-- | linux-headers/include/linux/android/binder.h | 27 | ||||
| -rw-r--r-- | linux-headers/include/linux/android/binderfs.h | 35 |
3 files changed, 63 insertions, 1 deletions
diff --git a/linux-headers/include/linux/android/..install.cmd b/linux-headers/include/linux/android/..install.cmd index 97505fd1..983763c9 100644 --- a/linux-headers/include/linux/android/..install.cmd +++ b/linux-headers/include/linux/android/..install.cmd @@ -1 +1 @@ -cmd_/scratch/palmer/work/20170821-glibc/riscv-gnu-toolchain/linux-headers/include/linux/android/.install := /bin/sh scripts/headers_install.sh /scratch/palmer/work/20170821-glibc/riscv-gnu-toolchain/linux-headers/include/linux/android ./include/uapi/linux/android binder.h; /bin/sh scripts/headers_install.sh /scratch/palmer/work/20170821-glibc/riscv-gnu-toolchain/linux-headers/include/linux/android ./include/generated/uapi/linux/android ; touch /scratch/palmer/work/20170821-glibc/riscv-gnu-toolchain/linux-headers/include/linux/android/.install +cmd_/home/users/kito/riscv-gnu-toolchain-workspace/riscv-gnu-toolchain/linux/install_hdr/include/linux/android/.install := /bin/sh scripts/headers_install.sh /home/users/kito/riscv-gnu-toolchain-workspace/riscv-gnu-toolchain/linux/install_hdr/include/linux/android ./include/uapi/linux/android binder.h binderfs.h; /bin/sh scripts/headers_install.sh /home/users/kito/riscv-gnu-toolchain-workspace/riscv-gnu-toolchain/linux/install_hdr/include/linux/android ./include/generated/uapi/linux/android ; touch /home/users/kito/riscv-gnu-toolchain-workspace/riscv-gnu-toolchain/linux/install_hdr/include/linux/android/.install diff --git a/linux-headers/include/linux/android/binder.h b/linux-headers/include/linux/android/binder.h index f8c25139..a3d457fe 100644 --- a/linux-headers/include/linux/android/binder.h +++ b/linux-headers/include/linux/android/binder.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* * Copyright (C) 2008 Google, Inc. * @@ -132,6 +133,7 @@ enum { /* struct binder_fd_array_object - object describing an array of fds in a buffer * @hdr: common header structure + * @pad: padding to ensure correct alignment * @num_fds: number of file descriptors in the buffer * @parent: index in offset array to buffer holding the fd array * @parent_offset: start offset of fd array in the buffer @@ -152,6 +154,7 @@ enum { */ struct binder_fd_array_object { struct binder_object_header hdr; + __u32 pad; binder_size_t num_fds; binder_size_t parent; binder_size_t parent_offset; @@ -184,6 +187,28 @@ struct binder_version { #define BINDER_CURRENT_PROTOCOL_VERSION 8 #endif +/* + * Use with BINDER_GET_NODE_DEBUG_INFO, driver reads ptr, writes to all fields. + * Set ptr to NULL for the first call to get the info for the first node, and + * then repeat the call passing the previously returned value to get the next + * nodes. ptr will be 0 when there are no more nodes. + */ +struct binder_node_debug_info { + binder_uintptr_t ptr; + binder_uintptr_t cookie; + __u32 has_strong_ref; + __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) @@ -191,6 +216,8 @@ struct binder_version { #define BINDER_SET_CONTEXT_MGR _IOW('b', 7, __s32) #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 diff --git a/linux-headers/include/linux/android/binderfs.h b/linux-headers/include/linux/android/binderfs.h new file mode 100644 index 00000000..ad6b05de --- /dev/null +++ b/linux-headers/include/linux/android/binderfs.h @@ -0,0 +1,35 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* + * Copyright (C) 2018 Canonical Ltd. + * + */ + +#ifndef _LINUX_BINDERFS_H +#define _LINUX_BINDERFS_H + +#include <linux/android/binder.h> +#include <linux/types.h> +#include <linux/ioctl.h> + +#define BINDERFS_MAX_NAME 255 + +/** + * struct binderfs_device - retrieve information about a new binder device + * @name: the name to use for the new binderfs binder device + * @major: major number allocated for binderfs binder devices + * @minor: minor number allocated for the new binderfs binder device + * + */ +struct binderfs_device { + char name[BINDERFS_MAX_NAME + 1]; + __u32 major; + __u32 minor; +}; + +/** + * Allocate a new binder device. + */ +#define BINDER_CTL_ADD _IOWR('b', 1, struct binderfs_device) + +#endif /* _LINUX_BINDERFS_H */ + |
