Mercurial > hg > openjdk > bsd-port > hotspot
changeset 5716:6c6d4d4c6c80
. On NetBSD, return the LWP id as the thread id.
Authored by: Christos Zoulas <christos@zoulas.com>
author | Greg Lewis <glewis@eyesbeyond.com> |
---|---|
date | Tue, 10 Mar 2015 21:01:22 -0700 |
parents | 3dba26b942d3 |
children | cdc8d4039989 |
files | src/os/bsd/vm/os_bsd.cpp |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/os/bsd/vm/os_bsd.cpp Sun Jan 25 08:30:35 2015 -0800 +++ b/src/os/bsd/vm/os_bsd.cpp Tue Mar 10 21:01:22 2015 -0700 @@ -1856,9 +1856,15 @@ return n; } +#ifdef __NetBSD__ +#include <lwp.h> +#endif + intx os::current_thread_id() { #ifdef __APPLE__ return (intx)::pthread_mach_thread_np(::pthread_self()); +#elif defined(__NetBSD__) + return (intx)_lwp_self(); #else return (intx)::pthread_self(); #endif