summaryrefslogtreecommitdiffstats
path: root/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/utils.c b/utils.c
index 38b5803..2ad301f 100644
--- a/utils.c
+++ b/utils.c
@@ -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);
}