Skip to content

Commit

Permalink
Sulong: Hook into Truffle language thread initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
fmorcos committed Jun 8, 2021
1 parent 1ebc310 commit 42ed7fc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,11 @@ public static LLVMContext getContext() {
return getCurrentContext(LLVMLanguage.class);
}

@Override
protected void initializeThread(LLVMContext context, Thread thread) {
getCapability(PlatformCapability.class).initializeThread(context, thread);
}

/**
* Do not use this on fast-path.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ protected PlatformCapability(Class<S> cls) {
valueToSysCall = initTable(cls);
}

public void initializeThread(@SuppressWarnings("unused") LLVMContext context,
@SuppressWarnings("unused") Thread thread) {
// Nothing needs to be done in Sulong for native thread initialization.
}

@SuppressWarnings("unchecked")
private S[] initTable(Class<S> cls) {
S[] constants = cls.getEnumConstants();
Expand Down

0 comments on commit 42ed7fc

Please sign in to comment.