| //===------------------------- Strings.java -------------------------------===// |
| // |
| // The VMKit project |
| // |
| // This file is distributed under the University of Illinois Open Source |
| // License. See LICENSE.TXT for details. |
| // |
| //===----------------------------------------------------------------------===// |
| |
| package org.j3.mmtk; |
| |
| import org.vmmagic.pragma.Uninterruptible; |
| |
| |
| @Uninterruptible |
| public final class Strings extends org.mmtk.vm.Strings { |
| /** |
| * Log a message. |
| * |
| * @param c character array with message starting at index 0 |
| * @param len number of characters in message |
| */ |
| public native void write(char [] c, int len); |
| |
| /** |
| * Log a thread identifier and a message. |
| * |
| * @param c character array with message starting at index 0 |
| * @param len number of characters in message |
| */ |
| public native void writeThreadId(char [] c, int len); |
| |
| /** |
| * Copies characters from the string into the character array. |
| * Thread switching is disabled during this method's execution. |
| * <p> |
| * <b>TODO:</b> There are special memory management semantics here that |
| * someone should document. |
| * |
| * @param src the source string |
| * @param dst the destination array |
| * @param dstBegin the start offset in the desination array |
| * @param dstEnd the index after the last character in the |
| * destination to copy to |
| * @return the number of characters copied. |
| */ |
| public native int copyStringToChars(String src, char [] dst, |
| int dstBegin, int dstEnd); |
| } |