diff options
author | Devin Moore <devinmoore@google.com> | 2020-09-22 17:20:54 +0000 |
---|---|---|
committer | Devin Moore <devinmoore@google.com> | 2020-09-22 17:33:14 +0000 |
commit | dd61a8901d3a3adfbe732ba63a9cc422b7e0f8cd (patch) | |
tree | 853fc56583e76381f614aefdf25013fc696e17f2 | |
parent | 7a268024813bb49a4b5e8a8ed6dce5b447b0a114 (diff) |
Reland "Add template parameters to MQDescriptor"
b26628ac32fa48f414ad321a4964675b4ad59de4
Bug: 142326204
Change-Id: I78d08f84231ca19905f51b0520ede1b71df34365
5 files changed, 102 insertions, 1 deletions
diff --git a/common/aidl/aidl_api/android.hardware.common/current/android/hardware/common/SynchronizedReadWrite.aidl b/common/aidl/aidl_api/android.hardware.common/current/android/hardware/common/SynchronizedReadWrite.aidl new file mode 100644 index 0000000000..aec3d6dfd3 --- /dev/null +++ b/common/aidl/aidl_api/android.hardware.common/current/android/hardware/common/SynchronizedReadWrite.aidl @@ -0,0 +1,22 @@ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL interface (or parcelable). Do not try to +// edit this file. It looks like you are doing that because you have modified +// an AIDL interface in a backward-incompatible way, e.g., deleting a function +// from an interface or a field from a parcelable and it broke the build. That +// breakage is intended. +// +// You must not make a backward incompatible changes to the AIDL files built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package android.hardware.common; +@VintfStability +enum SynchronizedReadWrite { + EMPTY = 0, +} diff --git a/common/aidl/aidl_api/android.hardware.common/current/android/hardware/common/UnsynchronizedWrite.aidl b/common/aidl/aidl_api/android.hardware.common/current/android/hardware/common/UnsynchronizedWrite.aidl new file mode 100644 index 0000000000..e390d20bce --- /dev/null +++ b/common/aidl/aidl_api/android.hardware.common/current/android/hardware/common/UnsynchronizedWrite.aidl @@ -0,0 +1,22 @@ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL interface (or parcelable). Do not try to +// edit this file. It looks like you are doing that because you have modified +// an AIDL interface in a backward-incompatible way, e.g., deleting a function +// from an interface or a field from a parcelable and it broke the build. That +// breakage is intended. +// +// You must not make a backward incompatible changes to the AIDL files built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package android.hardware.common; +@VintfStability +enum UnsynchronizedWrite { + EMPTY = 0, +} diff --git a/common/aidl/android/hardware/common/MQDescriptor.aidl b/common/aidl/android/hardware/common/MQDescriptor.aidl index 899768890e..7e89b15f56 100644 --- a/common/aidl/android/hardware/common/MQDescriptor.aidl +++ b/common/aidl/android/hardware/common/MQDescriptor.aidl @@ -22,9 +22,12 @@ import android.hardware.common.GrantorDescriptor; * For use with libfmq. This is created from an instance of AidlMessageQueue, * and is used to pass information required to create another instance of that * queue for fast communication. + * T - is used to specify the type of the payload + * Flavor - is used to specify the type of the queue using + * android.hardware.common.SynchronizedReadWrite or UnsynchronizedWrite */ @VintfStability -parcelable MQDescriptor { +parcelable MQDescriptor<T, Flavor> { /* * Describes each of the grantors for the message queue. They are used to * get the readptr, writeptr, dataptr, and the optional EventFlag word diff --git a/common/aidl/android/hardware/common/SynchronizedReadWrite.aidl b/common/aidl/android/hardware/common/SynchronizedReadWrite.aidl new file mode 100644 index 0000000000..ef93bf2aba --- /dev/null +++ b/common/aidl/android/hardware/common/SynchronizedReadWrite.aidl @@ -0,0 +1,27 @@ +/* + * Copyright 2020 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.hardware.common; + +/* + * For use with android.hardware.common.MQDescriptor to specify which type of + * queue to use. SynchronizedReadWrite is single reader, single writer, with no + * overflow. All messages written need to be read. + */ +@VintfStability +enum SynchronizedReadWrite { + EMPTY, +} diff --git a/common/aidl/android/hardware/common/UnsynchronizedWrite.aidl b/common/aidl/android/hardware/common/UnsynchronizedWrite.aidl new file mode 100644 index 0000000000..aa27c8d029 --- /dev/null +++ b/common/aidl/android/hardware/common/UnsynchronizedWrite.aidl @@ -0,0 +1,27 @@ +/* + * Copyright 2020 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.hardware.common; + +/* + * For use with android.hardware.common.MQDescriptor to specify which type of + * queue to use. UnsynchronizedWrite is single writer, multiple reader, with + * overflow. If messages are not read fast enough, they can be overwritten. + */ +@VintfStability +enum UnsynchronizedWrite { + EMPTY, +} |