3330 char* format, ...);
3331
3332 // this is called _before_ the most of global arguments have been parsed
3333 void os::init(void) {
3334 char dummy; // used to get a guess on initial stack address
3335
3336 // With BsdThreads the JavaMain thread pid (primordial thread)
3337 // is different than the pid of the java launcher thread.
3338 // So, on Bsd, the launcher thread pid is passed to the VM
3339 // via the sun.java.launcher.pid property.
3340 // Use this property instead of getpid() if it was correctly passed.
3341 // See bug 6351349.
3342 pid_t java_launcher_pid = (pid_t) Arguments::sun_java_launcher_pid();
3343
3344 _initial_pid = (java_launcher_pid > 0) ? java_launcher_pid : getpid();
3345
3346 clock_tics_per_sec = CLK_TCK;
3347
3348 init_random(1234567);
3349
3350 ThreadCritical::initialize();
3351
3352 Bsd::set_page_size(getpagesize());
3353 if (Bsd::page_size() == -1) {
3354 fatal("os_bsd.cpp: os::init: sysconf failed (%s)", os::strerror(errno));
3355 }
3356 init_page_sizes((size_t) Bsd::page_size());
3357
3358 Bsd::initialize_system_info();
3359
3360 // main_thread points to the aboriginal thread
3361 Bsd::_main_thread = pthread_self();
3362
3363 Bsd::clock_init();
3364 initial_time_count = javaTimeNanos();
3365
3366 #ifdef __APPLE__
3367 // XXXDARWIN
3368 // Work around the unaligned VM callbacks in hotspot's
3369 // sharedRuntime. The callbacks don't use SSE2 instructions, and work on
3370 // Linux, Solaris, and FreeBSD. On Mac OS X, dyld (rightly so) enforces
3371 // alignment when doing symbol lookup. To work around this, we force early
|
3330 char* format, ...);
3331
3332 // this is called _before_ the most of global arguments have been parsed
3333 void os::init(void) {
3334 char dummy; // used to get a guess on initial stack address
3335
3336 // With BsdThreads the JavaMain thread pid (primordial thread)
3337 // is different than the pid of the java launcher thread.
3338 // So, on Bsd, the launcher thread pid is passed to the VM
3339 // via the sun.java.launcher.pid property.
3340 // Use this property instead of getpid() if it was correctly passed.
3341 // See bug 6351349.
3342 pid_t java_launcher_pid = (pid_t) Arguments::sun_java_launcher_pid();
3343
3344 _initial_pid = (java_launcher_pid > 0) ? java_launcher_pid : getpid();
3345
3346 clock_tics_per_sec = CLK_TCK;
3347
3348 init_random(1234567);
3349
3350 Bsd::set_page_size(getpagesize());
3351 if (Bsd::page_size() == -1) {
3352 fatal("os_bsd.cpp: os::init: sysconf failed (%s)", os::strerror(errno));
3353 }
3354 init_page_sizes((size_t) Bsd::page_size());
3355
3356 Bsd::initialize_system_info();
3357
3358 // main_thread points to the aboriginal thread
3359 Bsd::_main_thread = pthread_self();
3360
3361 Bsd::clock_init();
3362 initial_time_count = javaTimeNanos();
3363
3364 #ifdef __APPLE__
3365 // XXXDARWIN
3366 // Work around the unaligned VM callbacks in hotspot's
3367 // sharedRuntime. The callbacks don't use SSE2 instructions, and work on
3368 // Linux, Solaris, and FreeBSD. On Mac OS X, dyld (rightly so) enforces
3369 // alignment when doing symbol lookup. To work around this, we force early
|