             return bytes_read
           o 'preClose0(Ljava/io/FileDescriptor;)V', (rs, fd_obj) ->
             # NOP, I think the actual fs.close is called later. If not, NBD.
+        ]
+        NativeThread: [
+          o "init()V", (rs) -> # NOP
+          o "current()J", (rs) ->
+              # -1 means that we do not require signaling according to the
+              # docs.
+              gLong.fromNumber(-1)
         ]
     reflect:
       ConstantPool: [

    nio:
      Bits: [
        o 'byteOrder()L!/!/ByteOrder;', (rs) -> rs.static_get {class:'java/nio/ByteOrder',name:'LITTLE_ENDIAN'}
      ]
      charset:
        Charset$3: [

            obj.set_field_from_offset rs, offset, new_obj
        o 'defineClass(Ljava/lang/String;[BIILjava/lang/ClassLoader;Ljava/security/ProtectionDomain;)Ljava/lang/Class;', (rs, _this, name, bytes, offset, len, loader, pd) ->
            native_define_class rs, name, bytes, offset, len, loader
        o 'pageSize()I', (rs) ->
            # Keep this in sync with sun/nio/ch/FileChannelImpl/initIDs for Mac
            # JCL compatibility.
            1024
      ]
    nio:
      ch:
        FileChannelImpl: [
          # this poorly-named method actually specifies the page size for mmap
          # This is the Mac name for sun/misc/Unsafe::pageSize. Apparently they
          # wanted to ensure page sizes can be > 2GB...
          o 'initIDs()J', (rs) -> gLong.fromNumber(1024)  # arbitrary
        ]
        FileDispatcher: [
