Example #1
0
  /** Set the set of registers that we will read and read and read again on every hardware cycle */
  @Override
  public void setReadWindow(ReadWindow newWindow) {
    synchronized (this.concurrentClientLock) {
      synchronized (this.callbackLock) {
        if (this.readWindow == null
            || !this.readWindow.isOkToRead()
            || !this.readWindow.sameAsIncludingMode(newWindow)) {
          // Remember the new window, but get a fresh copy so we can implement the read mode policy
          this.readWindow = newWindow.freshCopy();
          assertTrue(!BuildConfig.DEBUG || this.readWindow.isOkToRead());

          // Let others know of the update
          this.readWindowChanged = true;
        }
      }
    }
  }