Skip to content

Commit 1866712

Browse files
committed
Add missing TruffleBoundary
1 parent e243651 commit 1866712

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/EmulatedPosixSupport.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1537,11 +1537,16 @@ public long[] waitpid(long pid, int options) throws PosixException {
15371537
throw posixException(OSErrorEnum.ESRCH);
15381538
}
15391539
} catch (InterruptedException e) {
1540-
Thread.currentThread().interrupt();
1540+
interruptThread();
15411541
throw posixException(OSErrorEnum.EINTR);
15421542
}
15431543
}
15441544

1545+
@TruffleBoundary
1546+
private static void interruptThread() {
1547+
Thread.currentThread().interrupt();
1548+
}
1549+
15451550
// TODO the implementation of the following builtins is taken from posix.py,
15461551
// do they really make sense for the emulated backend? Is the handling of exist status correct?
15471552

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/PythonContext.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -974,6 +974,7 @@ public PythonNativeWrapper getSingletonNativeWrapper(PythonAbstractObject obj) {
974974
return null;
975975
}
976976

977+
@TruffleBoundary
977978
boolean ownsGil() {
978979
return globalInterpreterLock.isHeldByCurrentThread();
979980
}

0 commit comments

Comments
 (0)