mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Merge "Move .hal for FMQ benchmark code to hardware/interfaces."
This commit is contained in:
committed by
Android (Google) Code Review
commit
db63165c0e
33
benchmarks/msgq/1.0/Android.mk
Normal file
33
benchmarks/msgq/1.0/Android.mk
Normal file
@@ -0,0 +1,33 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := android.hardware.benchmarks.msgq@1.0
|
||||
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
|
||||
|
||||
intermediates := $(local-generated-sources-dir)
|
||||
|
||||
HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
|
||||
|
||||
#
|
||||
# Build IBenchmarkMsgQ.hal
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/benchmarks/msgq/1.0/BenchmarkMsgQAll.cpp
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IBenchmarkMsgQ.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Lc++ -randroid.hardware:hardware/interfaces\
|
||||
android.hardware.benchmarks.msgq@1.0::$(patsubst %.hal,%,$(notdir $(PRIVATE_DEPS)))
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/IBenchmarkMsgQ.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
LOCAL_EXPORT_C_INCLUDE_DIRS := $(intermediates)
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libhwbinder \
|
||||
libutils \
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
30
benchmarks/msgq/1.0/IBenchmarkMsgQ.hal
Normal file
30
benchmarks/msgq/1.0/IBenchmarkMsgQ.hal
Normal file
@@ -0,0 +1,30 @@
|
||||
package android.hardware.benchmarks.msgq@1.0;
|
||||
|
||||
interface IBenchmarkMsgQ {
|
||||
|
||||
struct shm_t {
|
||||
uint32_t fdIndex;
|
||||
uint32_t offset;
|
||||
uint32_t extent;
|
||||
};
|
||||
struct WireGrantorDescriptor {
|
||||
uint32_t flags;
|
||||
shm_t shm;
|
||||
};
|
||||
|
||||
struct WireMQDescriptor {
|
||||
vec<WireGrantorDescriptor> grantors;
|
||||
handle mq_handle;
|
||||
uint32_t quantum;
|
||||
uint32_t nQuanta;
|
||||
uint32_t flags;
|
||||
};
|
||||
|
||||
ConfigureClientInbox() generates ( WireMQDescriptor mq_desc_in );
|
||||
ConfigureClientOutbox() generates ( WireMQDescriptor mq_desc_out );
|
||||
RequestWrite (int32_t count) generates (int32_t ret);
|
||||
RequestRead(int32_t count) generates (int32_t ret);
|
||||
BenchmarkPingPong(uint32_t numIter);
|
||||
BenchmarkServiceWriteClientRead(uint32_t numIter);
|
||||
SendTimeData(vec<int64_t> time_data);
|
||||
};
|
||||
Reference in New Issue
Block a user