error: device/samsung/universal7885-common/apps/aidl-support/fm/Android.bp:1:1: module vendor.eureka.hardware.fmradio_interface: owner: aidl_interface in a soong_namespace must have the 'owner' property set.
13:04:27 soong bootstrap failed with: exit status 1
device/samsung/universal7885-common/apps/aidl-support/libfileio/FileIO.cpp:27:5: error: functions that differ only in their return type cannot be overloaded
int readline(const char *path) {
~~~ ^
device/samsung/universal7885-common/apps/aidl-support/libfileio/FileIO.cpp:12:13: note: previous definition is here
std::string readline(const char *path) {
~~~~~~~~~~~ ^
1 error generated.
- Rename int version to 'readint' to fix
try_lock() returns instantly, but it does acquires mutex lock if it is avaliable. If we just return try_lock() result, mutex is still locked by the thread. So it results in forever false with try_lock(). If the try_lock() returns true, unlock and return true for fix
According to cppreference.com, detach allows the thread to operate independently of thread handle, which is not our intent since we need it completely under control
https://en.cppreference.com/w/cpp/thread/thread/detach
* Remove join() call for std::thread which blocks the current context, halting the HAL thread also
* access returns 0 on successful, so we should make file if return value isnt 0
* Set parts AIDL thread to 3, for SwapThread, other interactions, Binder transaction