13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_RUNTIME_OS_HPP
26 #define SHARE_VM_RUNTIME_OS_HPP
27
28 #include "jvm.h"
29 #include "jvmtifiles/jvmti.h"
30 #include "metaprogramming/isRegisteredEnum.hpp"
31 #include "metaprogramming/integralConstant.hpp"
32 #include "runtime/extendedPC.hpp"
33 #include "runtime/handles.hpp"
34 #include "utilities/macros.hpp"
35 #ifndef _WINDOWS
36 # include <setjmp.h>
37 #endif
38 #ifdef __APPLE__
39 # include <mach/mach_time.h>
40 #endif
41
42 class AgentLibrary;
43 class frame;
44
45 // os defines the interface to operating system; this includes traditional
46 // OS services (time, I/O) as well as other functionality with system-
47 // dependent code.
48
49 typedef void (*dll_func)(...);
50
51 class Thread;
52 class JavaThread;
53 class Event;
54 class DLL;
55 class FileHandle;
56 class NativeCallStack;
57
58 template<class E> class GrowableArray;
59
60 // %%%%% Moved ThreadState, START_FN, OSThread to new osThread.hpp. -- Rose
61
62 // Platform-independent error return values from OS functions
63 enum OSReturn {
64 OS_OK = 0, // Operation was successful
65 OS_ERR = -1, // Operation failed
66 OS_INTRPT = -2, // Operation was interrupted
67 OS_TIMEOUT = -3, // Operation timed out
68 OS_NOMEM = -5, // Operation failed for lack of memory
69 OS_NORESOURCE = -6 // Operation failed for lack of nonmemory resource
70 };
71
72 enum ThreadPriority { // JLS 20.20.1-3
73 NoPriority = -1, // Initial non-priority value
74 MinPriority = 1, // Minimum priority
75 NormPriority = 5, // Normal (non-daemon) priority
76 NearMaxPriority = 9, // High priority, used for VMThread
|
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_RUNTIME_OS_HPP
26 #define SHARE_VM_RUNTIME_OS_HPP
27
28 #include "jvm.h"
29 #include "jvmtifiles/jvmti.h"
30 #include "metaprogramming/isRegisteredEnum.hpp"
31 #include "metaprogramming/integralConstant.hpp"
32 #include "runtime/extendedPC.hpp"
33 #include "utilities/exceptions.hpp"
34 #include "utilities/ostream.hpp"
35 #include "utilities/macros.hpp"
36 #ifndef _WINDOWS
37 # include <setjmp.h>
38 #endif
39 #ifdef __APPLE__
40 # include <mach/mach_time.h>
41 #endif
42
43 class AgentLibrary;
44 class frame;
45
46 // os defines the interface to operating system; this includes traditional
47 // OS services (time, I/O) as well as other functionality with system-
48 // dependent code.
49
50 typedef void (*dll_func)(...);
51
52 class Thread;
53 class JavaThread;
54 class Event;
55 class DLL;
56 class FileHandle;
57 class NativeCallStack;
58 class methodHandle;
59
60 template<class E> class GrowableArray;
61
62 // %%%%% Moved ThreadState, START_FN, OSThread to new osThread.hpp. -- Rose
63
64 // Platform-independent error return values from OS functions
65 enum OSReturn {
66 OS_OK = 0, // Operation was successful
67 OS_ERR = -1, // Operation failed
68 OS_INTRPT = -2, // Operation was interrupted
69 OS_TIMEOUT = -3, // Operation timed out
70 OS_NOMEM = -5, // Operation failed for lack of memory
71 OS_NORESOURCE = -6 // Operation failed for lack of nonmemory resource
72 };
73
74 enum ThreadPriority { // JLS 20.20.1-3
75 NoPriority = -1, // Initial non-priority value
76 MinPriority = 1, // Minimum priority
77 NormPriority = 5, // Normal (non-daemon) priority
78 NearMaxPriority = 9, // High priority, used for VMThread
|