libbinder: dec refs include count
This is in preparation for changing how/when we decrement refcounts. The
difference in this CL is that the wire format includes a count with an
easy mechanism to set the count we want.
The difference in behavior from this CL is that sometimes, multiple
decStrong refcounts will be combined into one. In the future, we'll want
to combine multiple of these.
Bug: 182940634
Test: binderRpcTest (on host and also on Pixel 3)
Change-Id: I2339a8e0fff3c35ce3c5f562d590da7a12b6670a
diff --git a/libs/binder/RpcWireFormat.h b/libs/binder/RpcWireFormat.h
index a87aa07..171550e 100644
--- a/libs/binder/RpcWireFormat.h
+++ b/libs/binder/RpcWireFormat.h
@@ -85,7 +85,7 @@
*/
RPC_COMMAND_REPLY,
/**
- * follows is RpcWireAddress
+ * follows is RpcDecStrong
*
* note - this in the protocol directly instead of as a 'special
* transaction' in order to keep it as lightweight as possible (we don't
@@ -117,6 +117,13 @@
};
static_assert(sizeof(RpcWireHeader) == 16);
+struct RpcDecStrong {
+ RpcWireAddress address;
+ uint32_t amount;
+ uint32_t reserved;
+};
+static_assert(sizeof(RpcDecStrong) == 16);
+
struct RpcWireTransaction {
RpcWireAddress address;
uint32_t code;