public static void cppOutputWithProcessLock(Cons synch) {
    { OutputStringStream s = OutputStringStream.newOutputStringStream();

      { Object old$CurrentStream$000 = Stella.$CURRENT_STREAM$.get();

        try {
          Native.setSpecial(Stella.$CURRENT_STREAM$, s);
          Stella_Object.cppOutputStatement(synch.value);

        } finally {
          Stella.$CURRENT_STREAM$.set(old$CurrentStream$000);
        }
      }
      StringWrapper.cppOutputComment(StringWrapper.wrapString("Should be synchronized on process lock " + s.theStringReader()));
      Stella.cppIndent();
    }
    Cons.cppOutputProgn(((Cons)(synch.rest.value)));
  }