Adds a static mutex to notifiers to stop destructor race condition (#204)

This commit is contained in:
Thad House
2016-08-15 19:56:32 -07:00
committed by Peter Johnson
parent 776cb915bc
commit 40365faeda
7 changed files with 49 additions and 26 deletions

View File

@@ -106,8 +106,11 @@ void NotifierThreadJNI::Main() {
jvm->DetachCurrentThread();
}
void notifierHandler(uint64_t currentTimeInt, void *param) {
((NotifierJNI *)param)->Notify(currentTimeInt);
void notifierHandler(uint64_t currentTimeInt, HAL_NotifierHandle handle) {
int32_t status = 0;
auto param = HAL_GetNotifierParam(handle, &status);
if (param == nullptr) return;
(static_cast<NotifierJNI*>(param))->Notify(currentTimeInt);
}
extern "C" {