Commit 11baf6eb authored by Suren Baghdasaryan's avatar Suren Baghdasaryan Committed by Treehugger Robot
Browse files

ANDROID: vendor_hooks: add definitions for indirect hook calls



Introduce DECLARE_INDIRECT_HOOK() and DEFINE_INDIRECT_HOOK() helper
macros to provide a way to call vendor hooks from a header file
without inclusion of trace headers and with no performance loss
when vendor hook is unused.
DECLARE_INDIRECT_HOOK() is used in the header to create an inline
function which checks the static key to determine if the vendor hook
is used. If it is used, it calls the vendor hook using a non-inlined
wrapper function. DECLARE_INDIRECT_HOOK() is used in the source file
to implement the vendor hook wrapper function.

Bug: 236578020
Change-Id: I3048191281e58323c5cde5ea4cb61ba23210ede2
Signed-off-by: default avatarSuren Baghdasaryan <surenb@google.com>
parent 57bc543a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment