Example #1
0
        internal jvmtiThreadState GetThreadState(JvmThreadReference thread)
        {
            jvmtiThreadState threadState;

            ThrowOnFailure(_rawInterface.GetThreadState(_env, (jthread)thread, out threadState));
            return(threadState);
        }
Example #2
0
        public jvmtiError GetThreadState(JvmVirtualMachineRemoteHandle virtualMachine, JvmThreadRemoteHandle thread, out jvmtiThreadState threadState)
        {
            JavaVM machine = JavaVM.GetInstance(virtualMachine);

            jvmtiThreadState threadStateResult = jvmtiThreadState.None;
            jvmtiError       result            = jvmtiError.Internal;

            machine.InvokeOnJvmThread(
                (environment) =>
            {
                jvmtiInterface rawInterface = environment.RawInterface;
                result = rawInterface.GetThreadState(environment.Handle, thread, out threadStateResult);
            });

            threadState = threadStateResult;
            return(result);
        }