hotspot/src/os/linux/vm/os_linux.cpp
changeset 8106 19106a0203fb
parent 7901 ea3d83447861
child 8108 b47e79fa1431
equal deleted inserted replaced
8076:96d498ec7ae1 8106:19106a0203fb
  2507 
  2507 
  2508 char *os::scan_pages(char *start, char* end, page_info* page_expected, page_info* page_found) {
  2508 char *os::scan_pages(char *start, char* end, page_info* page_expected, page_info* page_found) {
  2509   return end;
  2509   return end;
  2510 }
  2510 }
  2511 
  2511 
  2512 extern "C" void numa_warn(int number, char *where, ...) { }
  2512 // Something to do with the numa-aware allocator needs these symbols
  2513 extern "C" void numa_error(char *where) { }
  2513 extern "C" JNIEXPORT void numa_warn(int number, char *where, ...) { }
       
  2514 extern "C" JNIEXPORT void numa_error(char *where) { }
       
  2515 extern "C" JNIEXPORT int fork1() { return fork(); }
  2514 
  2516 
  2515 
  2517 
  2516 // If we are running with libnuma version > 2, then we should
  2518 // If we are running with libnuma version > 2, then we should
  2517 // be trying to use symbols with versions 1.1
  2519 // be trying to use symbols with versions 1.1
  2518 // If we are running with earlier version, which did not have symbol versions,
  2520 // If we are running with earlier version, which did not have symbol versions,
  3481 // the sa_flags field passed to sigaction() includes SA_SIGINFO and SA_RESTART.
  3483 // the sa_flags field passed to sigaction() includes SA_SIGINFO and SA_RESTART.
  3482 //
  3484 //
  3483 // Note that the VM will print warnings if it detects conflicting signal
  3485 // Note that the VM will print warnings if it detects conflicting signal
  3484 // handlers, unless invoked with the option "-XX:+AllowUserSignalHandlers".
  3486 // handlers, unless invoked with the option "-XX:+AllowUserSignalHandlers".
  3485 //
  3487 //
  3486 extern "C" int
  3488 extern "C" JNIEXPORT int
  3487 JVM_handle_linux_signal(int signo, siginfo_t* siginfo,
  3489 JVM_handle_linux_signal(int signo, siginfo_t* siginfo,
  3488                         void* ucontext, int abort_if_unrecognized);
  3490                         void* ucontext, int abort_if_unrecognized);
  3489 
  3491 
  3490 void signalHandler(int sig, siginfo_t* info, void* uc) {
  3492 void signalHandler(int sig, siginfo_t* info, void* uc) {
  3491   assert(info != NULL && uc != NULL, "it must be old kernel");
  3493   assert(info != NULL && uc != NULL, "it must be old kernel");
  4676     jio_fprintf(stderr,
  4678     jio_fprintf(stderr,
  4677       "Could not open pause file '%s', continuing immediately.\n", filename);
  4679       "Could not open pause file '%s', continuing immediately.\n", filename);
  4678   }
  4680   }
  4679 }
  4681 }
  4680 
  4682 
  4681 extern "C" {
       
  4682 
       
  4683 /**
       
  4684  * NOTE: the following code is to keep the green threads code
       
  4685  * in the libjava.so happy. Once the green threads is removed,
       
  4686  * these code will no longer be needed.
       
  4687  */
       
  4688 int
       
  4689 jdk_waitpid(pid_t pid, int* status, int options) {
       
  4690     return waitpid(pid, status, options);
       
  4691 }
       
  4692 
       
  4693 int
       
  4694 fork1() {
       
  4695     return fork();
       
  4696 }
       
  4697 
       
  4698 int
       
  4699 jdk_sem_init(sem_t *sem, int pshared, unsigned int value) {
       
  4700     return sem_init(sem, pshared, value);
       
  4701 }
       
  4702 
       
  4703 int
       
  4704 jdk_sem_post(sem_t *sem) {
       
  4705     return sem_post(sem);
       
  4706 }
       
  4707 
       
  4708 int
       
  4709 jdk_sem_wait(sem_t *sem) {
       
  4710     return sem_wait(sem);
       
  4711 }
       
  4712 
       
  4713 int
       
  4714 jdk_pthread_sigmask(int how , const sigset_t* newmask, sigset_t* oldmask) {
       
  4715     return pthread_sigmask(how , newmask, oldmask);
       
  4716 }
       
  4717 
       
  4718 }
       
  4719 
  4683 
  4720 // Refer to the comments in os_solaris.cpp park-unpark.
  4684 // Refer to the comments in os_solaris.cpp park-unpark.
  4721 //
  4685 //
  4722 // Beware -- Some versions of NPTL embody a flaw where pthread_cond_timedwait() can
  4686 // Beware -- Some versions of NPTL embody a flaw where pthread_cond_timedwait() can
  4723 // hang indefinitely.  For instance NPTL 0.60 on 2.4.21-4ELsmp is vulnerable.
  4687 // hang indefinitely.  For instance NPTL 0.60 on 2.4.21-4ELsmp is vulnerable.