8341513: Remove the unused thread_type field from OSThread

Reviewed-by: stefank, dholmes
This commit is contained in:
Amit Kumar 2024-10-18 03:37:50 +00:00
parent 7a16906ed0
commit f50bd0d9ec
9 changed files with 6 additions and 42 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2015 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -32,7 +32,6 @@
OSThread::OSThread()
: _thread_id(0),
_thread_type(),
_kernel_thread_id(0),
_caller_sigmask(),
sr(),

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2013 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -36,7 +36,6 @@ class OSThread : public OSThreadBase {
typedef pthread_t thread_id_t;
thread_id_t _thread_id;
int _thread_type;
// On AIX, we use the pthread id as OSThread::thread_id and keep the kernel thread id
// separately for diagnostic purposes.
@ -52,13 +51,6 @@ class OSThread : public OSThreadBase {
OSThread();
~OSThread();
int thread_type() const {
return _thread_type;
}
void set_thread_type(int type) {
_thread_type = type;
}
// Methods to save/restore caller's signal mask
sigset_t caller_sigmask() const { return _caller_sigmask; }
void set_caller_sigmask(sigset_t sigmask) { _caller_sigmask = sigmask; }

View File

@ -698,9 +698,6 @@ bool os::create_thread(Thread* thread, ThreadType thr_type,
return false;
}
// Set the correct thread state.
osthread->set_thread_type(thr_type);
// Initial state is ALLOCATED but not INITIALIZED
osthread->set_state(ALLOCATED);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2024, 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
@ -37,7 +37,6 @@ OSThread::OSThread()
nullptr
#endif
),
_thread_type(),
_pthread_id(nullptr),
_unique_thread_id(0),
_caller_sigmask(),

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2024, 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
@ -39,7 +39,6 @@ class OSThread : public OSThreadBase {
#endif
thread_id_t _thread_id;
int _thread_type;
// _pthread_id is the pthread id, which is used by library calls
// (e.g. pthread_kill).
@ -56,13 +55,6 @@ class OSThread : public OSThreadBase {
OSThread();
~OSThread();
int thread_type() const {
return _thread_type;
}
void set_thread_type(int type) {
_thread_type = type;
}
// Methods to save/restore caller's signal mask
sigset_t caller_sigmask() const { return _caller_sigmask; }
void set_caller_sigmask(sigset_t sigmask) { _caller_sigmask = sigmask; }

View File

@ -633,9 +633,6 @@ bool os::create_thread(Thread* thread, ThreadType thr_type,
return false;
}
// set the correct thread state
osthread->set_thread_type(thr_type);
// Initial state is ALLOCATED but not INITIALIZED
osthread->set_state(ALLOCATED);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2024, 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
@ -31,7 +31,6 @@
OSThread::OSThread()
: _thread_id(0),
_thread_type(),
_pthread_id(0),
_caller_sigmask(),
sr(),

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2024, 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
@ -35,7 +35,6 @@ class OSThread : public OSThreadBase {
typedef pid_t thread_id_t;
thread_id_t _thread_id;
int _thread_type;
// _pthread_id is the pthread id, which is used by library calls
// (e.g. pthread_kill).
@ -47,13 +46,6 @@ class OSThread : public OSThreadBase {
OSThread();
~OSThread();
int thread_type() const {
return _thread_type;
}
void set_thread_type(int type) {
_thread_type = type;
}
// Methods to save/restore caller's signal mask
sigset_t caller_sigmask() const { return _caller_sigmask; }
void set_caller_sigmask(sigset_t sigmask) { _caller_sigmask = sigmask; }

View File

@ -974,9 +974,6 @@ bool os::create_thread(Thread* thread, ThreadType thr_type,
return false;
}
// set the correct thread state
osthread->set_thread_type(thr_type);
// Initial state is ALLOCATED but not INITIALIZED
osthread->set_state(ALLOCATED);