Mercurial > hg > truffle
comparison src/share/vm/runtime/thread.cpp @ 356:1ee8caae33af
Merge
author | tonyp |
---|---|
date | Thu, 21 Aug 2008 23:36:31 -0400 |
parents | 69fefd031e6c d95b224e9f17 |
children | 5d254928c888 |
comparison
equal
deleted
inserted
replaced
355:0edda524b58c | 356:1ee8caae33af |
---|---|
1 /* | 1 /* |
2 * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. | 2 * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
2597 } | 2597 } |
2598 | 2598 |
2599 oop JavaThread::current_park_blocker() { | 2599 oop JavaThread::current_park_blocker() { |
2600 // Support for JSR-166 locks | 2600 // Support for JSR-166 locks |
2601 oop thread_oop = threadObj(); | 2601 oop thread_oop = threadObj(); |
2602 if (thread_oop != NULL && JDK_Version::supports_thread_park_blocker()) { | 2602 if (thread_oop != NULL && |
2603 JDK_Version::current().supports_thread_park_blocker()) { | |
2603 return java_lang_Thread::park_blocker(thread_oop); | 2604 return java_lang_Thread::park_blocker(thread_oop); |
2604 } | 2605 } |
2605 return NULL; | 2606 return NULL; |
2606 } | 2607 } |
2607 | 2608 |
2780 // If CompilerThreads ever become non-JavaThreads, add them here | 2781 // If CompilerThreads ever become non-JavaThreads, add them here |
2781 } | 2782 } |
2782 | 2783 |
2783 jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) { | 2784 jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) { |
2784 | 2785 |
2786 extern void JDK_Version_init(); | |
2787 | |
2785 // Check version | 2788 // Check version |
2786 if (!is_supported_jni_version(args->version)) return JNI_EVERSION; | 2789 if (!is_supported_jni_version(args->version)) return JNI_EVERSION; |
2787 | 2790 |
2788 // Initialize the output stream module | 2791 // Initialize the output stream module |
2789 ostream_init(); | 2792 ostream_init(); |
2794 // Initialize the os module before using TLS | 2797 // Initialize the os module before using TLS |
2795 os::init(); | 2798 os::init(); |
2796 | 2799 |
2797 // Initialize system properties. | 2800 // Initialize system properties. |
2798 Arguments::init_system_properties(); | 2801 Arguments::init_system_properties(); |
2802 | |
2803 // So that JDK version can be used as a discrimintor when parsing arguments | |
2804 JDK_Version_init(); | |
2799 | 2805 |
2800 // Parse arguments | 2806 // Parse arguments |
2801 jint parse_result = Arguments::parse(args); | 2807 jint parse_result = Arguments::parse(args); |
2802 if (parse_result != JNI_OK) return parse_result; | 2808 if (parse_result != JNI_OK) return parse_result; |
2803 | 2809 |