From 88b57a99f095351356d314bda64032ba5aa36ddc Mon Sep 17 00:00:00 2001 From: Sebastiano Barezzi Date: Sun, 20 Jun 2021 02:49:03 +0200 Subject: [PATCH] sm7250-common: libqti-perfd-client: Move to C * Why bothering with C++ mangling when we can just build it as a standard C library? Change-Id: I45ea977edf7ea7fab6fece76f3049654a8d24c5d --- libqti-perfd-client/Android.bp | 2 +- libqti-perfd-client/{client.cpp => client.c} | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) rename libqti-perfd-client/{client.cpp => client.c} (58%) diff --git a/libqti-perfd-client/Android.bp b/libqti-perfd-client/Android.bp index 77f9332..010d072 100644 --- a/libqti-perfd-client/Android.bp +++ b/libqti-perfd-client/Android.bp @@ -3,7 +3,7 @@ cc_library_shared { proprietary: true, defaults: ["hidl_defaults"], srcs: [ - "client.cpp", + "client.c", ], cflags: [ "-Werror", diff --git a/libqti-perfd-client/client.cpp b/libqti-perfd-client/client.c similarity index 58% rename from libqti-perfd-client/client.cpp rename to libqti-perfd-client/client.c index 8c0cee2..42b3cdc 100644 --- a/libqti-perfd-client/client.cpp +++ b/libqti-perfd-client/client.c @@ -3,9 +3,9 @@ #include #include -extern "C" void perf_get_feedback() {} -extern "C" void perf_hint() {} -extern "C" int perf_lock_acq(int handle, int duration, int arg3[], int arg4) { +void perf_get_feedback() {} +void perf_hint() {} +int perf_lock_acq(int handle, int duration, int arg3[], int arg4) { ALOGI("perf_lock_acq: handle: %d, duration: %d, arg3[0]: %d, arg4: %d", handle, duration, arg3[0], arg4); if (handle > 0) @@ -13,12 +13,12 @@ extern "C" int perf_lock_acq(int handle, int duration, int arg3[], int arg4) { return 233; } -extern "C" void perf_lock_cmd() {} -extern "C" int perf_lock_rel(int handle) { +void perf_lock_cmd() {} +int perf_lock_rel(int handle) { ALOGI("perf_lock_rel: handle: %d", handle); if (handle > 0) return handle; return 233; } -extern "C" void perf_lock_use_profile() {} +void perf_lock_use_profile() {}