Skip to content
Snippets Groups Projects
  1. May 16, 2013
    • Nadav Har'El's avatar
      Default console to cooked mode, not raw mode. · cf74861e
      Nadav Har'El authored
      Until now, OSV's console defaulted to raw mode, to make the CLI
      happy. The problem is that on Linux, applications expect to be
      run in cooked mode, so if we ever run a simple application that
      tries to read user input, it can be confused.
      
      This patch makes OSV console default to cooked mode, and the
      CLI switch to raw mode before reading an input line - and reset
      to the default mode just before running the user's command.
      
      Unfortunately, we had to resort to adding a JNI class "Stty",
      since Java has no builtin support for the ioctls required for
      changing the tty settings.
      cf74861e
  2. May 14, 2013
  3. May 12, 2013
    • Nadav Har'El's avatar
      Some badly-written Java code - including the "serial" benchmark of · 271ede99
      Nadav Har'El authored
      SPECjvm2008, uses the Thread.getContextClassLoader() class loader
      to load classes - instead of using the current class-loader as any
      decent code does when using reflection.
      
      To allow this ugly, but officially supported, usage, we need to
      set the context class loader in RunJar.java.
      271ede99
  4. May 09, 2013
  5. May 08, 2013
  6. May 07, 2013
  7. May 01, 2013
  8. Apr 30, 2013
  9. Apr 23, 2013
  10. Apr 22, 2013
    • Nadav Har'El's avatar
      Add build framework for Java classes and JNI · 448a1d51
      Nadav Har'El authored
      Added build ("make") framework for compiling Java code we want to run in
      OSv (in/with the Java payload), as well as JNI, i.e., OSv-specific C code
      we want to run from the above Java code.
      
      The Java source files in java/src/ are now all compiled during build
      (see java/build.xml for the Ant file doing this compilation) and the
      result is one JAR, build/$mode/java/cloudius.jar (/cloudius.jar in bootfs).
      We can easily change build.xml to create more than one if we want.
      
      As an example of JNI, I used the not-working-yet balloon feature.
      java/src/com/cloudius/balloon/Balloon.java is the class
      com.cloudius.balloon.Balloon which is supposed to have one "native"
      (implemented in C) function giveup(). This function's implementation is
      in java/jni/balloon.c. We get this file to compile to balloon.so (put
      in /usr/lib/jni in the bootfs) by adding java/jni/balloon.so to the
      "jni" list in build.mak.
      
      If you don't know how write the ugly function signature as seen in
      java/jni/balloon.c, you can run "javah com.cloudius.balloon.Balloon"
      to build the empty functions needed for implementing the native functions
      defined in the above class.
      448a1d51
  11. Apr 17, 2013
  12. Apr 11, 2013
  13. Apr 03, 2013
  14. Feb 11, 2013
Loading