https://kotlinlang.org logo
#coroutines
Title
# coroutines
g

groostav

05/22/2018, 10:14 PM
Hey so, I need to dig into some serious gore about how threads in win32 with java work. We're calling a binary through JNA which occasionally produces a
Intel Fortran Runtime Error: IEEE754 is signalling
. This made me realize I really dont know how signals work. They are synchronous and on-thread correct? In the sense that If you look at the call stack it would look something like this: top: 1. java entry point 2. JNA 3. fortran entry point 4. fortran math 5. ???? 6. fortran signal handler Or are signals raised on other threads? I'm not sure where x86 ends and Windows begins here.
🚓 1
v

Vsevolod Tolstopyatov [JB]

05/23/2018, 8:28 AM
Why do you think it’s a signal and not an error propagated by Fortran code? Could you elaborate what
occasionally produces
means? JNI throws an
Error
? JVM crashes?
Or are signals raised on other threads
Signals work differently on Linux and Windows. On Linux they are asynchronous and not thread-bound (unless you specify it explicitly via
fnctl()
). Moreover, if you want to handle signals from JNI, you have to use signal chaining, because JVM uses standard signals for its own machinery (http://www.oracle.com/technetwork/java/javase/signals-139944.html). Windows has its own very limited subset of synchronous signals (which is AFAIK is not well supported by JVM), but I don’t know much about them
3 Views