生成されたスレッド側の処理の流れは以下のようになる.
実行が開始されると java_start() 関数から処理が始まる.
java_start() からは最終的に Thread::run() が呼び出される.
(なお, java_start() は各 OS 毎に実装されている. ただし, どの場合でも最終的には Thread::run() に行き着く)
java_start()
-> (1) TLS の設定
-> ThreadLocalStorage::set_thread()
(1) スレッドの作成に失敗した場合は, ここで OSThread::startThread_lock() に対して Monitor::notify_all() して終了.
(生成したスレッドと同期を取る処理)
(1) NUMA 関係の設定
-> os::numa_get_group_id()
-> Thread::set_lgrp_id()
(1) シグナルマスクの設定
-> os::Linux::hotspot_sigmask()
-> (See: here for details)
(1) FPU 関係の初期化
-> os::Linux::init_thread_fpu_state()
(1) 生成元のスレッドと同期を取る
-> Monitor::notify_all()
(OSThread::startThread_lock() に対して notify_all())
-> Monitor::wait()
(OSThread::startThread_lock() に対して wait)
(1) 実際にこのスレッドのメイン処理を実行
-> Thread::run()
-> (Thread の各サブクラスでオーバーライドされた run() メソッドが呼び出される)
See: here for details
See: here for details
See: here for details
See: here for details
See: here for details
See: here for details
See: here for details
(#Under Construction)
See: here for details
See: here for details
(#Under Construction)
(#Under Construction)
See: here for details
(#Under Construction)
(#Under Construction)
See: here for details
See: here for details
See: here for details
See: here for details
(#Under Construction)
(#Under Construction)
(#Under Construction)
(#Under Construction)
See: here for details
See: here for details
See: here for details
See: here for details
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.