src/app/jdk/lib/jvm/os_genode.cpp
// this is called _before_ the most of global arguments have been parsed
this is called _before_ the most of global arguments have been parsed
this is called _before_ the most of global arguments have been parsed
void os::init(void) {
  char dummy;   
  pid_t java_launcher_pid = (pid_t) Arguments::sun_java_launcher_pid();
  _initial_pid = (java_launcher_pid > 0) ? java_launcher_pid : getpid();
  clock_tics_per_sec = CLK_TCK;
  init_random(1234567);
  ThreadCritical::initialize();
  Bsd::set_page_size(getpagesize());
  if (Bsd::page_size() == -1) {
    fatal("os_bsd.cpp: os::init: sysconf failed (%s)", os::strerror(errno));
  }
  init_page_sizes((size_t) Bsd::page_size());
  Bsd::initialize_system_info();
  Bsd::_main_thread = pthread_self();
  Bsd::clock_init();
  initial_time_count = javaTimeNanos();
#ifdef __APPLE__
  _dyld_bind_fully_image_containing_address((const void *) &os::init);
#endif
}
void os :: init ( void ) { char dummy ; pid_t java_launcher_pid = ( pid_t ) Arguments :: sun_java_launcher_pid ( ) ; _initial_pid = ( java_launcher_pid > 0 ) ? java_launcher_pid : getpid ( ) ; clock_tics_per_sec = CLK_TCK ; init_random ( 1234567 ) ; ThreadCritical :: initialize ( ) ; Bsd :: set_page_size ( getpagesize ( ) ) ; if ( Bsd :: page_size ( ) == -1 ) { fatal ( " " , os :: strerror ( errno ) ) ; } init_page_sizes ( ( size_t ) Bsd :: page_size ( ) ) ; Bsd :: initialize_system_info ( ) ; Bsd :: _main_thread = pthread_self ( ) ; Bsd :: clock_init ( ) ; initial_time_count = javaTimeNanos ( ) ; #ifdef __APPLE__ _dyld_bind_fully_image_containing_address ( ( const void * ) & os :: init ) ; #endif }
this is called _before_ the most of global arguments have been parsed
this is called _before_ the most of global arguments have been parsed
// used to get a guess on initial stack address //  first_hrtime = gethrtime(); // With BsdThreads the JavaMain thread pid (primordial thread) // is different than the pid of the java launcher thread. // So, on Bsd, the launcher thread pid is passed to the VM // via the sun.java.launcher.pid property. // Use this property instead of getpid() if it was correctly passed. // See bug 6351349. // main_thread points to the aboriginal thread // XXXDARWIN // Work around the unaligned VM callbacks in hotspot's // sharedRuntime. The callbacks don't use SSE2 instructions, and work on // Linux, Solaris, and FreeBSD. On Mac OS X, dyld (rightly so) enforces // alignment when doing symbol lookup. To work around this, we force early // binding of all symbols now, thus binding when alignment is known-good.