mirror of https://github.com/mgba-emu/mgba.git
Switch: Fix threading-related crash on second launch
This commit is contained in:
parent
c2b6692ce2
commit
c5b686fce2
4
CHANGES
4
CHANGES
|
@ -1,3 +1,7 @@
|
||||||
|
0.7.3: (Future)
|
||||||
|
Other fixes:
|
||||||
|
- Switch: Fix threading-related crash on second launch
|
||||||
|
|
||||||
0.7.2: (2019-05-25)
|
0.7.2: (2019-05-25)
|
||||||
Emulation fixes:
|
Emulation fixes:
|
||||||
- GB: Fix HALT when IE and IF unused bits are set (fixes mgba.io/i/1349)
|
- GB: Fix HALT when IE and IF unused bits are set (fixes mgba.io/i/1349)
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
typedef ThreadFunc ThreadEntry;
|
typedef ThreadFunc ThreadEntry;
|
||||||
typedef CondVar Condition;
|
typedef CondVar Condition;
|
||||||
|
|
||||||
|
#define ThreadJoin(T) ThreadJoinPtr(&T)
|
||||||
|
|
||||||
static inline int MutexInit(Mutex* mutex) {
|
static inline int MutexInit(Mutex* mutex) {
|
||||||
mutexInit(mutex);
|
mutexInit(mutex);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -71,12 +73,12 @@ static inline int ThreadCreate(Thread* thread, ThreadEntry entry, void* context)
|
||||||
return threadStart(thread);
|
return threadStart(thread);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int ThreadJoin(Thread thread) {
|
static inline int ThreadJoinPtr(Thread* thread) {
|
||||||
int res = threadWaitForExit(&thread);
|
int res = threadWaitForExit(thread);
|
||||||
if(R_FAILED(res)) {
|
if(R_FAILED(res)) {
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
return threadClose(&thread);
|
return threadClose(thread);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void ThreadSetName(const char* name) {
|
static inline void ThreadSetName(const char* name) {
|
||||||
|
|
Loading…
Reference in New Issue