static void enter(JNIJavaVM vm) { CEntryPointActions.enterAttachThread(vm.getFunctions().getIsolate()); } }
@SuppressWarnings("unused") static void enter(ThreadStartData data) { int code = CEntryPointActions.enterAttachThread(data.getIsolate()); if (code != 0) { CEntryPointActions.failFatally(code, errorMessage.get()); } } }
@SuppressWarnings("unused") static void enter(WindowsThreadStartData data) { int code = CEntryPointActions.enterAttachThread(data.getIsolate()); if (code != 0) { CEntryPointActions.failFatally(code, errorMessage.get()); } } }
static void enter(NativeTruffleContext context) { if (CEntryPointActions.enterAttachThread(context.isolate()) != 0) { CEntryPointActions.bailoutInPrologue(WordFactory.nullPointer()); } } }
@Uninterruptible(reason = UNINTERRUPTIBLE_REASON) @CEntryPoint @CEntryPointOptions(prologue = NoPrologue.class, epilogue = NoEpilogue.class, publishAs = Publish.NotPublished) @CEntryPointBuiltinImplementation(builtin = Builtin.ATTACH_THREAD) public static IsolateThread attachThread(Isolate isolate) { IsolateThread result = WordFactory.nullPointer(); int status = CEntryPointActions.enterAttachThread(isolate); if (status == 0) { result = CurrentIsolate.getCurrentThread(); status = CEntryPointActions.leave(); } return result; }
@Uninterruptible(reason = UNINTERRUPTIBLE_REASON) @CEntryPoint(name = "attach_thread", documentation = { "Attaches the current thread to the passed isolate.", "On failure, returns a non-zero value. On success, writes the address of the", "created isolate thread structure to the passed pointer and returns 0.", "If the thread has already been attached, the call succeeds and also provides", "the thread's isolate thread structure."}) @CEntryPointOptions(prologue = NoPrologue.class, epilogue = NoEpilogue.class, nameTransformation = NameTransformation.class) public static int attachThread(Isolate isolate, IsolateThreadPointer thread) { int result = CEntryPointActions.enterAttachThread(isolate); if (result == 0) { thread.write(CurrentIsolate.getCurrentThread()); result = CEntryPointActions.leave(); } return result; }