Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/hotspot/os/aix/osThread_aix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,9 @@ OSThread::OSThread()
_siginfo(nullptr),
_ucontext(nullptr),
_expanding_stack(0),
_alt_sig_stack(nullptr),
_startThread_lock(new Monitor(Mutex::event, "startThread_lock")) {
_alt_sig_stack(nullptr) {
sigemptyset(&_caller_sigmask);
}

OSThread::~OSThread() {
delete _startThread_lock;
}
9 changes: 0 additions & 9 deletions src/hotspot/os/aix/osThread_aix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,6 @@ class OSThread : public OSThreadBase {
void set_alt_sig_stack(address val) { _alt_sig_stack = val; }
address alt_sig_stack(void) { return _alt_sig_stack; }

private:
Monitor* _startThread_lock; // sync parent and child in thread creation

public:

Monitor* startThread_lock() const {
return _startThread_lock;
}

// Printing
uintx thread_id_for_printing() const override {
return (uintx)_thread_id;
Expand Down
2 changes: 2 additions & 0 deletions src/hotspot/os/aix/os_aix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,8 @@ bool os::create_thread(Thread* thread, ThreadType thr_type,
// OSThread::thread_id is the pthread id.
osthread->set_thread_id(tid);

// child thread synchronization is not done here on AIX, a thread is started in suspended state

Comment on lines +799 to +800
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is interesting that on Windows, where we also start threads suspended, we also do:

// Thread state now is INITIALIZED, not SUSPENDED
  osthread->set_state(INITIALIZED);

then we have:

  // The thread is returned suspended (in state INITIALIZED), and is started higher up in the call chain
  return true;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I see now that states ALLOCATED and INITIALIZED are really only needed for the parent/child handshake.

return true;
}

Expand Down