Class NFIState

java.lang.Object
com.oracle.truffle.nfi.backend.spi.NFIState

public final class NFIState extends Object
Thread-local state of the NFI that is shared between different backends. All methods should only be called from the corresponding thread to which this state belongs (for thread-safety reasons and because the SVM NFI backend relies on it by using a FastThreadLocalBytes for the errno pointer, which means the errno pointer points inside the IsolateThread), except the constructor and dispose() which may be called from another thread, as Truffle hooks which call those are not guaranteed to be called from the corresponding thread.
  • Constructor Details

    • NFIState

      public NFIState(Thread thread)
  • Method Details

    • getNFIErrno

      public int getNFIErrno()
    • setNFIErrno

      public void setNFIErrno(int nfiErrno)
    • getPendingException

      public Throwable getPendingException()
    • setPendingException

      public void setPendingException(Throwable t)
    • clearPendingException

      public void clearPendingException()
    • dispose

      public void dispose()