Loading tests/msgq/1.0/ITestMsgQ.hal +5 −5 Original line number Original line Diff line number Diff line Loading @@ -24,14 +24,14 @@ interface ITestMsgQ { /** /** * This method requests the service to set up a synchronous read/write * This method requests the service to set up a synchronous read/write * wait-free FMQ with the client as reader. * wait-free FMQ using the input descriptor with the client as reader. * * @param mqDesc This structure describes the FMQ that was set up by the * client. Server uses this descriptor to set up a FMQ object at its end. * * * @return ret True if the setup is successful. * @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. */ */ configureFmqSyncReadWrite() configureFmqSyncReadWrite(fmq_sync<uint16_t> mqDesc) generates(bool ret); generates(bool ret, fmq_sync<uint16_t> mqDesc); /** /** * This method requests the service to return an MQDescriptor to * This method requests the service to return an MQDescriptor to Loading tests/msgq/1.0/default/TestMsgQ.cpp +13 −16 Original line number Original line Diff line number Diff line Loading @@ -24,13 +24,12 @@ namespace V1_0 { namespace implementation { namespace implementation { // Methods from ::android::hardware::tests::msgq::V1_0::ITestMsgQ follow. // Methods from ::android::hardware::tests::msgq::V1_0::ITestMsgQ follow. Return<void> TestMsgQ::configureFmqSyncReadWrite(configureFmqSyncReadWrite_cb _hidl_cb) { Return<bool> TestMsgQ::configureFmqSyncReadWrite( static constexpr size_t kNumElementsInQueue = 1024; const android::hardware::MQDescriptorSync<uint16_t>& mqDesc) { mFmqSynchronized.reset(new (std::nothrow) MessageQueueSync( mFmqSynchronized.reset(new (std::nothrow) MessageQueueSync(mqDesc)); kNumElementsInQueue, true /* configureEventFlagWord */)); if ((mFmqSynchronized == nullptr) || (mFmqSynchronized->isValid() == false)) { if ((mFmqSynchronized == nullptr) || (mFmqSynchronized->isValid() == false)) { _hidl_cb(false /* ret */, MessageQueueSync::Descriptor()); return false; } else { } /* /* * Initialize the EventFlag word with bit FMQ_NOT_FULL. * Initialize the EventFlag word with bit FMQ_NOT_FULL. */ */ Loading @@ -39,9 +38,7 @@ Return<void> TestMsgQ::configureFmqSyncReadWrite(configureFmqSyncReadWrite_cb _h std::atomic_init(evFlagWordPtr, std::atomic_init(evFlagWordPtr, static_cast<uint32_t>(ITestMsgQ::EventFlagBits::FMQ_NOT_FULL)); static_cast<uint32_t>(ITestMsgQ::EventFlagBits::FMQ_NOT_FULL)); } } _hidl_cb(true /* ret */, *mFmqSynchronized->getDesc()); return true; } return Void(); } } Return<void> TestMsgQ::getFmqUnsyncWrite(bool configureFmq, getFmqUnsyncWrite_cb _hidl_cb) { Return<void> TestMsgQ::getFmqUnsyncWrite(bool configureFmq, getFmqUnsyncWrite_cb _hidl_cb) { Loading tests/msgq/1.0/default/TestMsgQ.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -55,7 +55,7 @@ struct TestMsgQ : public ITestMsgQ { TestMsgQ() : mFmqSynchronized(nullptr), mFmqUnsynchronized(nullptr) {} TestMsgQ() : mFmqSynchronized(nullptr), mFmqUnsynchronized(nullptr) {} // Methods from ::android::hardware::tests::msgq::V1_0::ITestMsgQ follow. // Methods from ::android::hardware::tests::msgq::V1_0::ITestMsgQ follow. Return<void> configureFmqSyncReadWrite(configureFmqSyncReadWrite_cb _hidl_cb) override; Return<bool> configureFmqSyncReadWrite(const MQDescriptorSync<uint16_t>& mqDesc) override; Return<void> getFmqUnsyncWrite(bool configureFmq, getFmqUnsyncWrite_cb _hidl_cb) override; Return<void> getFmqUnsyncWrite(bool configureFmq, getFmqUnsyncWrite_cb _hidl_cb) override; Return<bool> requestWriteFmqSync(int32_t count) override; Return<bool> requestWriteFmqSync(int32_t count) override; Return<bool> requestReadFmqSync(int32_t count) override; Return<bool> requestReadFmqSync(int32_t count) override; Loading Loading
tests/msgq/1.0/ITestMsgQ.hal +5 −5 Original line number Original line Diff line number Diff line Loading @@ -24,14 +24,14 @@ interface ITestMsgQ { /** /** * This method requests the service to set up a synchronous read/write * This method requests the service to set up a synchronous read/write * wait-free FMQ with the client as reader. * wait-free FMQ using the input descriptor with the client as reader. * * @param mqDesc This structure describes the FMQ that was set up by the * client. Server uses this descriptor to set up a FMQ object at its end. * * * @return ret True if the setup is successful. * @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. */ */ configureFmqSyncReadWrite() configureFmqSyncReadWrite(fmq_sync<uint16_t> mqDesc) generates(bool ret); generates(bool ret, fmq_sync<uint16_t> mqDesc); /** /** * This method requests the service to return an MQDescriptor to * This method requests the service to return an MQDescriptor to Loading
tests/msgq/1.0/default/TestMsgQ.cpp +13 −16 Original line number Original line Diff line number Diff line Loading @@ -24,13 +24,12 @@ namespace V1_0 { namespace implementation { namespace implementation { // Methods from ::android::hardware::tests::msgq::V1_0::ITestMsgQ follow. // Methods from ::android::hardware::tests::msgq::V1_0::ITestMsgQ follow. Return<void> TestMsgQ::configureFmqSyncReadWrite(configureFmqSyncReadWrite_cb _hidl_cb) { Return<bool> TestMsgQ::configureFmqSyncReadWrite( static constexpr size_t kNumElementsInQueue = 1024; const android::hardware::MQDescriptorSync<uint16_t>& mqDesc) { mFmqSynchronized.reset(new (std::nothrow) MessageQueueSync( mFmqSynchronized.reset(new (std::nothrow) MessageQueueSync(mqDesc)); kNumElementsInQueue, true /* configureEventFlagWord */)); if ((mFmqSynchronized == nullptr) || (mFmqSynchronized->isValid() == false)) { if ((mFmqSynchronized == nullptr) || (mFmqSynchronized->isValid() == false)) { _hidl_cb(false /* ret */, MessageQueueSync::Descriptor()); return false; } else { } /* /* * Initialize the EventFlag word with bit FMQ_NOT_FULL. * Initialize the EventFlag word with bit FMQ_NOT_FULL. */ */ Loading @@ -39,9 +38,7 @@ Return<void> TestMsgQ::configureFmqSyncReadWrite(configureFmqSyncReadWrite_cb _h std::atomic_init(evFlagWordPtr, std::atomic_init(evFlagWordPtr, static_cast<uint32_t>(ITestMsgQ::EventFlagBits::FMQ_NOT_FULL)); static_cast<uint32_t>(ITestMsgQ::EventFlagBits::FMQ_NOT_FULL)); } } _hidl_cb(true /* ret */, *mFmqSynchronized->getDesc()); return true; } return Void(); } } Return<void> TestMsgQ::getFmqUnsyncWrite(bool configureFmq, getFmqUnsyncWrite_cb _hidl_cb) { Return<void> TestMsgQ::getFmqUnsyncWrite(bool configureFmq, getFmqUnsyncWrite_cb _hidl_cb) { Loading
tests/msgq/1.0/default/TestMsgQ.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -55,7 +55,7 @@ struct TestMsgQ : public ITestMsgQ { TestMsgQ() : mFmqSynchronized(nullptr), mFmqUnsynchronized(nullptr) {} TestMsgQ() : mFmqSynchronized(nullptr), mFmqUnsynchronized(nullptr) {} // Methods from ::android::hardware::tests::msgq::V1_0::ITestMsgQ follow. // Methods from ::android::hardware::tests::msgq::V1_0::ITestMsgQ follow. Return<void> configureFmqSyncReadWrite(configureFmqSyncReadWrite_cb _hidl_cb) override; Return<bool> configureFmqSyncReadWrite(const MQDescriptorSync<uint16_t>& mqDesc) override; Return<void> getFmqUnsyncWrite(bool configureFmq, getFmqUnsyncWrite_cb _hidl_cb) override; Return<void> getFmqUnsyncWrite(bool configureFmq, getFmqUnsyncWrite_cb _hidl_cb) override; Return<bool> requestWriteFmqSync(int32_t count) override; Return<bool> requestWriteFmqSync(int32_t count) override; Return<bool> requestReadFmqSync(int32_t count) override; Return<bool> requestReadFmqSync(int32_t count) override; Loading