mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-05 20:45:43 +00:00
* fix: stop the DirectAudio output while the sink is suspended * fix: verify every session thread before reporting suspension * fix: freeze PRoot first and stop each guest thread on suspend --------- Co-authored-by: Detinator10 <8469261+Detinator10@users.noreply.github.com>
20 lines
551 B
C
20 lines
551 B
C
#include <errno.h>
|
|
#include <jni.h>
|
|
#include <stdatomic.h>
|
|
#include <sys/syscall.h>
|
|
#include <unistd.h>
|
|
|
|
JNIEXPORT void JNICALL
|
|
Java_com_droiddeck_launcher_input_FakeInputWriter_nativeStoreFence(JNIEnv *env, jclass clazz) {
|
|
(void)env;
|
|
(void)clazz;
|
|
atomic_thread_fence(memory_order_release);
|
|
}
|
|
|
|
JNIEXPORT jint JNICALL
|
|
Java_com_droiddeck_launcher_session_ThreadSignals_tgkill(JNIEnv *env, jclass clazz, jint tgid, jint tid, jint signal) {
|
|
(void)env;
|
|
(void)clazz;
|
|
return syscall(SYS_tgkill, tgid, tid, signal) == 0 ? 0 : errno;
|
|
}
|