Mercurial > hg > graal-jvmci-8
comparison src/os/linux/vm/os_linux.cpp @ 2193:9cd8a2c2d584
Merge
author | bobv |
---|---|
date | Wed, 02 Feb 2011 11:54:26 -0500 |
parents | b92c45f2bc75 d70fe6ab4436 |
children | 63d374c54045 |
comparison
equal
deleted
inserted
replaced
2192:b92c45f2bc75 | 2193:9cd8a2c2d584 |
---|---|
2515 | 2515 |
2516 char *os::scan_pages(char *start, char* end, page_info* page_expected, page_info* page_found) { | 2516 char *os::scan_pages(char *start, char* end, page_info* page_expected, page_info* page_found) { |
2517 return end; | 2517 return end; |
2518 } | 2518 } |
2519 | 2519 |
2520 extern "C" void numa_warn(int number, char *where, ...) { } | 2520 // Something to do with the numa-aware allocator needs these symbols |
2521 extern "C" void numa_error(char *where) { } | 2521 extern "C" JNIEXPORT void numa_warn(int number, char *where, ...) { } |
2522 extern "C" JNIEXPORT void numa_error(char *where) { } | |
2523 extern "C" JNIEXPORT int fork1() { return fork(); } | |
2522 | 2524 |
2523 | 2525 |
2524 // If we are running with libnuma version > 2, then we should | 2526 // If we are running with libnuma version > 2, then we should |
2525 // be trying to use symbols with versions 1.1 | 2527 // be trying to use symbols with versions 1.1 |
2526 // If we are running with earlier version, which did not have symbol versions, | 2528 // If we are running with earlier version, which did not have symbol versions, |
3489 // the sa_flags field passed to sigaction() includes SA_SIGINFO and SA_RESTART. | 3491 // the sa_flags field passed to sigaction() includes SA_SIGINFO and SA_RESTART. |
3490 // | 3492 // |
3491 // Note that the VM will print warnings if it detects conflicting signal | 3493 // Note that the VM will print warnings if it detects conflicting signal |
3492 // handlers, unless invoked with the option "-XX:+AllowUserSignalHandlers". | 3494 // handlers, unless invoked with the option "-XX:+AllowUserSignalHandlers". |
3493 // | 3495 // |
3494 extern "C" int | 3496 extern "C" JNIEXPORT int |
3495 JVM_handle_linux_signal(int signo, siginfo_t* siginfo, | 3497 JVM_handle_linux_signal(int signo, siginfo_t* siginfo, |
3496 void* ucontext, int abort_if_unrecognized); | 3498 void* ucontext, int abort_if_unrecognized); |
3497 | 3499 |
3498 void signalHandler(int sig, siginfo_t* info, void* uc) { | 3500 void signalHandler(int sig, siginfo_t* info, void* uc) { |
3499 assert(info != NULL && uc != NULL, "it must be old kernel"); | 3501 assert(info != NULL && uc != NULL, "it must be old kernel"); |
4684 jio_fprintf(stderr, | 4686 jio_fprintf(stderr, |
4685 "Could not open pause file '%s', continuing immediately.\n", filename); | 4687 "Could not open pause file '%s', continuing immediately.\n", filename); |
4686 } | 4688 } |
4687 } | 4689 } |
4688 | 4690 |
4689 extern "C" { | |
4690 | |
4691 /** | |
4692 * NOTE: the following code is to keep the green threads code | |
4693 * in the libjava.so happy. Once the green threads is removed, | |
4694 * these code will no longer be needed. | |
4695 */ | |
4696 int | |
4697 jdk_waitpid(pid_t pid, int* status, int options) { | |
4698 return waitpid(pid, status, options); | |
4699 } | |
4700 | |
4701 int | |
4702 fork1() { | |
4703 return fork(); | |
4704 } | |
4705 | |
4706 int | |
4707 jdk_sem_init(sem_t *sem, int pshared, unsigned int value) { | |
4708 return sem_init(sem, pshared, value); | |
4709 } | |
4710 | |
4711 int | |
4712 jdk_sem_post(sem_t *sem) { | |
4713 return sem_post(sem); | |
4714 } | |
4715 | |
4716 int | |
4717 jdk_sem_wait(sem_t *sem) { | |
4718 return sem_wait(sem); | |
4719 } | |
4720 | |
4721 int | |
4722 jdk_pthread_sigmask(int how , const sigset_t* newmask, sigset_t* oldmask) { | |
4723 return pthread_sigmask(how , newmask, oldmask); | |
4724 } | |
4725 | |
4726 } | |
4727 | 4691 |
4728 // Refer to the comments in os_solaris.cpp park-unpark. | 4692 // Refer to the comments in os_solaris.cpp park-unpark. |
4729 // | 4693 // |
4730 // Beware -- Some versions of NPTL embody a flaw where pthread_cond_timedwait() can | 4694 // Beware -- Some versions of NPTL embody a flaw where pthread_cond_timedwait() can |
4731 // hang indefinitely. For instance NPTL 0.60 on 2.4.21-4ELsmp is vulnerable. | 4695 // hang indefinitely. For instance NPTL 0.60 on 2.4.21-4ELsmp is vulnerable. |