test/hotspot/gtest/threadHelper.inline.hpp
changeset 54416 b788c494aa46
parent 53268 c02949731190
child 54623 1126f0607c70
equal deleted inserted replaced
54415:00fda51e28cf 54416:b788c494aa46
     1 /*
     1 /*
     2  * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    64   }
    64   }
    65 
    65 
    66   // Override as JavaThread::post_run() calls JavaThread::exit which
    66   // Override as JavaThread::post_run() calls JavaThread::exit which
    67   // expects a valid thread object oop.
    67   // expects a valid thread object oop.
    68   virtual void post_run() {
    68   virtual void post_run() {
    69     Threads::remove(this);
    69     Threads::remove(this, false);
    70     this->smr_delete();
    70     this->smr_delete();
    71   }
    71   }
    72 
    72 
    73   void doit() {
    73   void doit() {
    74     if (os::create_thread(this, os::os_thread)) {
    74     if (os::create_thread(this, os::os_thread)) {
   116   }
   116   }
   117 
   117 
   118   // Override as JavaThread::post_run() calls JavaThread::exit which
   118   // Override as JavaThread::post_run() calls JavaThread::exit which
   119   // expects a valid thread object oop. And we need to call signal.
   119   // expects a valid thread object oop. And we need to call signal.
   120   void post_run() {
   120   void post_run() {
   121     Threads::remove(this);
   121     Threads::remove(this, false);
   122     _post->signal();
   122     _post->signal();
   123     this->smr_delete();
   123     this->smr_delete();
   124   }
   124   }
   125 
   125 
   126   void doit() {
   126   void doit() {