diff options
author | Hridya Valsaraju <hridya@google.com> | 2016-10-14 16:48:01 -0700 |
---|---|---|
committer | Hridya Valsaraju <hridya@google.com> | 2016-10-19 18:19:13 -0700 |
commit | b43584556fc9d01cdcc80d5f06501aa2ccbc410f (patch) | |
tree | 02c440300a83c3fe5f29384f8bb42109381b9e57 /tests | |
parent | f7ad111d727b5bf237013758226b85adf068aadb (diff) | |
download | platform_hardware_interfaces-b43584556fc9d01cdcc80d5f06501aa2ccbc410f.tar.gz platform_hardware_interfaces-b43584556fc9d01cdcc80d5f06501aa2ccbc410f.tar.bz2 platform_hardware_interfaces-b43584556fc9d01cdcc80d5f06501aa2ccbc410f.zip |
Add methods to test flavor of FMQ supporting unsynchronized writes.
Test: Built and ran the unit tests.
Bug: 31223183
Change-Id: Ib0c52c4d17d31a24f4c5f5cd96547bcfae673725
Diffstat (limited to 'tests')
-rw-r--r-- | tests/msgq/1.0/ITestMsgQ.hal | 57 |
1 files changed, 47 insertions, 10 deletions
diff --git a/tests/msgq/1.0/ITestMsgQ.hal b/tests/msgq/1.0/ITestMsgQ.hal index fc9618159a..dcdc74a2ce 100644 --- a/tests/msgq/1.0/ITestMsgQ.hal +++ b/tests/msgq/1.0/ITestMsgQ.hal @@ -18,9 +18,10 @@ package android.hardware.tests.msgq@1.0; interface ITestMsgQ { /* - * This method requests the service to set up Synchronous read/write + * This method requests the service to set up a synchronous read/write * wait-free FMQ with the client as reader. - * @return ret Will be true if the setup is successful, false otherwise. + * + * @return ret True if the setup is successful. * @return mqDesc This structure describes the FMQ that was * set up by the service. Client can use it to set up the FMQ at its end. */ @@ -28,18 +29,54 @@ interface ITestMsgQ { generates(bool ret, MQDescriptorSync mqDesc); /* - * This method request the service to write into the FMQ. + * This method requests the service to set up an unsynchronized write + * wait-free FMQ with the client as reader. + * + * @return ret True if the setup is successful. + * @return mqDesc This structure describes the FMQ that was + * set up by the service. Client can use it to set up the FMQ at its end. + */ + configureFmqUnsyncWrite() + generates(bool ret, MQDescriptorUnsync mqDesc); + + /* + * This method request the service to write into the synchronized read/write + * flavor of the FMQ. + * * @param count Number to messages to write. - * @return ret Will be true if the write operation was successful, - * false otherwise. + * + * @return ret True if the write operation was successful. */ - requestWrite(int32_t count) generates(bool ret); + requestWriteFmqSync(int32_t count) generates(bool ret); /* - * This method request the service to read from the FMQ. + * This method request the service to read from the synchronized read/write + * FMQ. + * * @param count Number to messages to read. - * @return ret Will be true if the read operation was successful, false - * otherwise. + * + * @return ret True if the read operation was successful. */ - requestRead(int32_t count) generates(bool ret); + requestReadFmqSync(int32_t count) generates(bool ret); + + /* + * This method request the service to write into the unsynchronized flavor + * of FMQ. + * + * @param count Number to messages to write. + * + * @return ret True if the write operation was successful. + */ + requestWriteFmqUnsync(int32_t count) generates(bool ret); + + /* + * This method request the service to read from the unsynchronized flavor of + * FMQ. + * + * @param count Number to messages to read. + * + * @return ret Will be True if the read operation was successful. + */ + requestReadFmqUnsync(int32_t count) generates(bool ret); + }; |