diff options
Diffstat (limited to 'utils.c')
-rw-r--r-- | utils.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -256,6 +256,20 @@ int perf_hint_enable(int hint_id, int duration) { return lock_handle; } +// Same as perf_hint_enable, but with the ability to +// choose the type +int perf_hint_enable_with_type(int hint_id, int duration, int type) { + int lock_handle = 0; + + if (qcopt_handle) { + if (perf_hint) { + lock_handle = perf_hint(hint_id, NULL, duration, type); + if (lock_handle == -1) ALOGE("Failed to acquire lock."); + } + } + return lock_handle; +} + void release_request(int lock_handle) { if (qcopt_handle && perf_lock_rel) perf_lock_rel(lock_handle); } |