| .. | .. |
|---|
| 67 | 67 | * @FLAT_BINDER_FLAG_ACCEPTS_FDS: whether the node accepts fds. |
|---|
| 68 | 68 | */ |
|---|
| 69 | 69 | FLAT_BINDER_FLAG_ACCEPTS_FDS = 0x100, |
|---|
| 70 | + |
|---|
| 70 | 71 | /** |
|---|
| 71 | 72 | * @FLAT_BINDER_FLAG_SCHED_POLICY_MASK: bit-mask for scheduling policy |
|---|
| 72 | 73 | * |
|---|
| .. | .. |
|---|
| 264 | 265 | __u32 reserved3; |
|---|
| 265 | 266 | }; |
|---|
| 266 | 267 | |
|---|
| 268 | +struct binder_freeze_info { |
|---|
| 269 | + __u32 pid; |
|---|
| 270 | + __u32 enable; |
|---|
| 271 | + __u32 timeout_ms; |
|---|
| 272 | +}; |
|---|
| 273 | + |
|---|
| 274 | +struct binder_frozen_status_info { |
|---|
| 275 | + __u32 pid; |
|---|
| 276 | + |
|---|
| 277 | + /* process received sync transactions since last frozen |
|---|
| 278 | + * bit 0: received sync transaction after being frozen |
|---|
| 279 | + * bit 1: new pending sync transaction during freezing |
|---|
| 280 | + */ |
|---|
| 281 | + __u32 sync_recv; |
|---|
| 282 | + |
|---|
| 283 | + /* process received async transactions since last frozen */ |
|---|
| 284 | + __u32 async_recv; |
|---|
| 285 | +}; |
|---|
| 286 | + |
|---|
| 267 | 287 | #define BINDER_WRITE_READ _IOWR('b', 1, struct binder_write_read) |
|---|
| 268 | 288 | #define BINDER_SET_IDLE_TIMEOUT _IOW('b', 3, __s64) |
|---|
| 269 | 289 | #define BINDER_SET_MAX_THREADS _IOW('b', 5, __u32) |
|---|
| .. | .. |
|---|
| 274 | 294 | #define BINDER_GET_NODE_DEBUG_INFO _IOWR('b', 11, struct binder_node_debug_info) |
|---|
| 275 | 295 | #define BINDER_GET_NODE_INFO_FOR_REF _IOWR('b', 12, struct binder_node_info_for_ref) |
|---|
| 276 | 296 | #define BINDER_SET_CONTEXT_MGR_EXT _IOW('b', 13, struct flat_binder_object) |
|---|
| 297 | +#define BINDER_FREEZE _IOW('b', 14, struct binder_freeze_info) |
|---|
| 298 | +#define BINDER_GET_FROZEN_INFO _IOWR('b', 15, struct binder_frozen_status_info) |
|---|
| 299 | +#define BINDER_ENABLE_ONEWAY_SPAM_DETECTION _IOW('b', 16, __u32) |
|---|
| 277 | 300 | |
|---|
| 278 | 301 | /* |
|---|
| 279 | 302 | * NOTE: Two special error codes you should check for when calling |
|---|
| .. | .. |
|---|
| 295 | 318 | TF_ROOT_OBJECT = 0x04, /* contents are the component's root object */ |
|---|
| 296 | 319 | TF_STATUS_CODE = 0x08, /* contents are a 32-bit status code */ |
|---|
| 297 | 320 | TF_ACCEPT_FDS = 0x10, /* allow replies with file descriptors */ |
|---|
| 321 | + TF_CLEAR_BUF = 0x20, /* clear buffer on txn complete */ |
|---|
| 322 | + TF_UPDATE_TXN = 0x40, /* update the outdated pending async txn */ |
|---|
| 298 | 323 | }; |
|---|
| 299 | 324 | |
|---|
| 300 | 325 | struct binder_transaction_data { |
|---|
| .. | .. |
|---|
| 451 | 476 | |
|---|
| 452 | 477 | BR_FAILED_REPLY = _IO('r', 17), |
|---|
| 453 | 478 | /* |
|---|
| 454 | | - * The the last transaction (either a bcTRANSACTION or |
|---|
| 479 | + * The last transaction (either a bcTRANSACTION or |
|---|
| 455 | 480 | * a bcATTEMPT_ACQUIRE) failed (e.g. out of memory). No parameters. |
|---|
| 456 | 481 | */ |
|---|
| 482 | + |
|---|
| 483 | + BR_FROZEN_REPLY = _IO('r', 18), |
|---|
| 484 | + /* |
|---|
| 485 | + * The target of the last transaction (either a bcTRANSACTION or |
|---|
| 486 | + * a bcATTEMPT_ACQUIRE) is frozen. No parameters. |
|---|
| 487 | + */ |
|---|
| 488 | + |
|---|
| 489 | + BR_ONEWAY_SPAM_SUSPECT = _IO('r', 19), |
|---|
| 490 | + /* |
|---|
| 491 | + * Current process sent too many oneway calls to target, and the last |
|---|
| 492 | + * asynchronous transaction makes the allocated async buffer size exceed |
|---|
| 493 | + * detection threshold. No parameters. |
|---|
| 494 | + */ |
|---|
| 457 | 495 | }; |
|---|
| 458 | 496 | |
|---|
| 459 | 497 | enum binder_driver_command_protocol { |
|---|