sdm: Add DynLib utility for dynamic library lifecycle management.
- Add DynLib utility to automatically unload libraries upon
destruction of the utility object.
CRs-Fixed: 1029997
Change-Id: I4e13ad984949db170498fe1ec5c133fa4a798bdd
diff --git a/sdm/libs/hwc/cpuhint.h b/sdm/libs/hwc/cpuhint.h
index a4a7758..e758763 100644
--- a/sdm/libs/hwc/cpuhint.h
+++ b/sdm/libs/hwc/cpuhint.h
@@ -31,6 +31,7 @@
#define __CPUHINT_H__
#include <core/sdm_types.h>
+#include <utils/sys.h>
namespace sdm {
@@ -38,7 +39,6 @@
class CPUHint {
public:
- ~CPUHint();
DisplayError Init(HWCDebugHandler *debug_handler);
void Set();
void Reset();
@@ -51,7 +51,7 @@
int frame_countdown_ = 0;
int lock_handle_ = 0;
bool lock_acquired_ = false;
- void *lib_handle_ = NULL;
+ DynLib vendor_ext_lib_;
int (*fn_lock_acquire_)(int handle, int duration, int *hints, int num_args) = NULL;
int (*fn_lock_release_)(int value) = NULL;
};