mirror of
https://github.com/corda/corda.git
synced 2025-04-25 13:29:51 +00:00
implement JVM_Yield
This commit is contained in:
parent
7fffba29e6
commit
a0a23b4692
@ -43,6 +43,7 @@
|
|||||||
# include <sys/socket.h>
|
# include <sys/socket.h>
|
||||||
# include <fcntl.h>
|
# include <fcntl.h>
|
||||||
# include <errno.h>
|
# include <errno.h>
|
||||||
|
# include <sched.h>
|
||||||
|
|
||||||
# define OPEN open
|
# define OPEN open
|
||||||
# define CLOSE close
|
# define CLOSE close
|
||||||
@ -1240,7 +1241,10 @@ JVM_SetThreadPriority(Thread*, jobject, jint)
|
|||||||
}
|
}
|
||||||
|
|
||||||
extern "C" JNIEXPORT void JNICALL
|
extern "C" JNIEXPORT void JNICALL
|
||||||
JVM_Yield(Thread*, jclass) { abort(); }
|
JVM_Yield(Thread*, jclass)
|
||||||
|
{
|
||||||
|
sched_yield();
|
||||||
|
}
|
||||||
|
|
||||||
extern "C" JNIEXPORT void JNICALL
|
extern "C" JNIEXPORT void JNICALL
|
||||||
JVM_Sleep(Thread* t, jclass, jlong milliseconds)
|
JVM_Sleep(Thread* t, jclass, jlong milliseconds)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user