Skip to content

Commit f50bd0d

Browse files
committed
8341513: Remove the unused thread_type field from OSThread
Reviewed-by: stefank, dholmes
1 parent 7a16906 commit f50bd0d

File tree

9 files changed

+6
-42
lines changed

9 files changed

+6
-42
lines changed

src/hotspot/os/aix/osThread_aix.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
33
* Copyright (c) 2012, 2015 SAP SE. All rights reserved.
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
@@ -32,7 +32,6 @@
3232

3333
OSThread::OSThread()
3434
: _thread_id(0),
35-
_thread_type(),
3635
_kernel_thread_id(0),
3736
_caller_sigmask(),
3837
sr(),

src/hotspot/os/aix/osThread_aix.hpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
33
* Copyright (c) 2012, 2013 SAP SE. All rights reserved.
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
@@ -36,7 +36,6 @@ class OSThread : public OSThreadBase {
3636
typedef pthread_t thread_id_t;
3737

3838
thread_id_t _thread_id;
39-
int _thread_type;
4039

4140
// On AIX, we use the pthread id as OSThread::thread_id and keep the kernel thread id
4241
// separately for diagnostic purposes.
@@ -52,13 +51,6 @@ class OSThread : public OSThreadBase {
5251
OSThread();
5352
~OSThread();
5453

55-
int thread_type() const {
56-
return _thread_type;
57-
}
58-
void set_thread_type(int type) {
59-
_thread_type = type;
60-
}
61-
6254
// Methods to save/restore caller's signal mask
6355
sigset_t caller_sigmask() const { return _caller_sigmask; }
6456
void set_caller_sigmask(sigset_t sigmask) { _caller_sigmask = sigmask; }

src/hotspot/os/aix/os_aix.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -698,9 +698,6 @@ bool os::create_thread(Thread* thread, ThreadType thr_type,
698698
return false;
699699
}
700700

701-
// Set the correct thread state.
702-
osthread->set_thread_type(thr_type);
703-
704701
// Initial state is ALLOCATED but not INITIALIZED
705702
osthread->set_state(ALLOCATED);
706703

src/hotspot/os/bsd/osThread_bsd.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -37,7 +37,6 @@ OSThread::OSThread()
3737
nullptr
3838
#endif
3939
),
40-
_thread_type(),
4140
_pthread_id(nullptr),
4241
_unique_thread_id(0),
4342
_caller_sigmask(),

src/hotspot/os/bsd/osThread_bsd.hpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -39,7 +39,6 @@ class OSThread : public OSThreadBase {
3939
#endif
4040

4141
thread_id_t _thread_id;
42-
int _thread_type;
4342

4443
// _pthread_id is the pthread id, which is used by library calls
4544
// (e.g. pthread_kill).
@@ -56,13 +55,6 @@ class OSThread : public OSThreadBase {
5655
OSThread();
5756
~OSThread();
5857

59-
int thread_type() const {
60-
return _thread_type;
61-
}
62-
void set_thread_type(int type) {
63-
_thread_type = type;
64-
}
65-
6658
// Methods to save/restore caller's signal mask
6759
sigset_t caller_sigmask() const { return _caller_sigmask; }
6860
void set_caller_sigmask(sigset_t sigmask) { _caller_sigmask = sigmask; }

src/hotspot/os/bsd/os_bsd.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -633,9 +633,6 @@ bool os::create_thread(Thread* thread, ThreadType thr_type,
633633
return false;
634634
}
635635

636-
// set the correct thread state
637-
osthread->set_thread_type(thr_type);
638-
639636
// Initial state is ALLOCATED but not INITIALIZED
640637
osthread->set_state(ALLOCATED);
641638

src/hotspot/os/linux/osThread_linux.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -31,7 +31,6 @@
3131

3232
OSThread::OSThread()
3333
: _thread_id(0),
34-
_thread_type(),
3534
_pthread_id(0),
3635
_caller_sigmask(),
3736
sr(),

src/hotspot/os/linux/osThread_linux.hpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -35,7 +35,6 @@ class OSThread : public OSThreadBase {
3535
typedef pid_t thread_id_t;
3636

3737
thread_id_t _thread_id;
38-
int _thread_type;
3938

4039
// _pthread_id is the pthread id, which is used by library calls
4140
// (e.g. pthread_kill).
@@ -47,13 +46,6 @@ class OSThread : public OSThreadBase {
4746
OSThread();
4847
~OSThread();
4948

50-
int thread_type() const {
51-
return _thread_type;
52-
}
53-
void set_thread_type(int type) {
54-
_thread_type = type;
55-
}
56-
5749
// Methods to save/restore caller's signal mask
5850
sigset_t caller_sigmask() const { return _caller_sigmask; }
5951
void set_caller_sigmask(sigset_t sigmask) { _caller_sigmask = sigmask; }

src/hotspot/os/linux/os_linux.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -974,9 +974,6 @@ bool os::create_thread(Thread* thread, ThreadType thr_type,
974974
return false;
975975
}
976976

977-
// set the correct thread state
978-
osthread->set_thread_type(thr_type);
979-
980977
// Initial state is ALLOCATED but not INITIALIZED
981978
osthread->set_state(ALLOCATED);
982979

0 commit comments

Comments
 (0)