aboutsummaryrefslogtreecommitdiff
path: root/src/os
diff options
context:
space:
mode:
authorrbackman <none@none>2012-03-06 12:36:59 +0100
committerrbackman <none@none>2012-03-06 12:36:59 +0100
commit185df800609793e7b9142afe2f77ff5007e86a90 (patch)
tree1565bc57844382a9f96080a16424e66b78acc8fa /src/os
parentfafce2a0026105885be0ee82477f423aee59854d (diff)
7160570: Intrinsification support for tracing framework
Reviewed-by: sla, never
Diffstat (limited to 'src/os')
-rw-r--r--src/os/bsd/vm/osThread_bsd.hpp3
-rw-r--r--src/os/linux/vm/osThread_linux.hpp4
-rw-r--r--src/os/solaris/vm/osThread_solaris.hpp1
-rw-r--r--src/os/windows/vm/osThread_windows.hpp4
4 files changed, 10 insertions, 2 deletions
diff --git a/src/os/bsd/vm/osThread_bsd.hpp b/src/os/bsd/vm/osThread_bsd.hpp
index 0e60cc3ee..914a0439c 100644
--- a/src/os/bsd/vm/osThread_bsd.hpp
+++ b/src/os/bsd/vm/osThread_bsd.hpp
@@ -72,15 +72,18 @@
#ifdef _ALLBSD_SOURCE
#ifdef __APPLE__
+ static size_t thread_id_size() { return sizeof(thread_t); }
thread_t thread_id() const {
return _thread_id;
}
#else
+ static size_t thread_id_size() { return sizeof(pthread_t); }
pthread_t thread_id() const {
return _thread_id;
}
#endif
#else
+ static size_t thread_id_size() { return sizeof(pid_t); }
pid_t thread_id() const {
return _thread_id;
}
diff --git a/src/os/linux/vm/osThread_linux.hpp b/src/os/linux/vm/osThread_linux.hpp
index 22945135b..fe9fe6188 100644
--- a/src/os/linux/vm/osThread_linux.hpp
+++ b/src/os/linux/vm/osThread_linux.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -56,6 +56,8 @@
sigset_t caller_sigmask() const { return _caller_sigmask; }
void set_caller_sigmask(sigset_t sigmask) { _caller_sigmask = sigmask; }
+ static size_t thread_id_size() { return sizeof(pid_t); }
+
pid_t thread_id() const {
return _thread_id;
}
diff --git a/src/os/solaris/vm/osThread_solaris.hpp b/src/os/solaris/vm/osThread_solaris.hpp
index 7fe1417e3..6e79e1855 100644
--- a/src/os/solaris/vm/osThread_solaris.hpp
+++ b/src/os/solaris/vm/osThread_solaris.hpp
@@ -36,6 +36,7 @@
bool _vm_created_thread; // true if the VM created this thread,
// false if primary thread or attached thread
public:
+ static size_t thread_id_size() { return sizeof(thread_t); }
thread_t thread_id() const { return _thread_id; }
uint lwp_id() const { return _lwp_id; }
int native_priority() const { return _native_priority; }
diff --git a/src/os/windows/vm/osThread_windows.hpp b/src/os/windows/vm/osThread_windows.hpp
index 1df8925c7..28cd45c5c 100644
--- a/src/os/windows/vm/osThread_windows.hpp
+++ b/src/os/windows/vm/osThread_windows.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -42,6 +42,8 @@ typedef void* HANDLE;
HANDLE interrupt_event() const { return _interrupt_event; }
void set_interrupt_event(HANDLE interrupt_event) { _interrupt_event = interrupt_event; }
+
+ static size_t thread_id_size() { return sizeof(unsigned long); }
unsigned long thread_id() const { return _thread_id; }
#ifndef PRODUCT
// Used for debugging, return a unique integer for each thread.