More SIGQUIT handling, various Thread fixes.
Change-Id: I3233c300d1c838c2eee0ba9be6018b7fbd907386
diff --git a/src/thread.h b/src/thread.h
index 87cfb6c..2e2444f 100644
--- a/src/thread.h
+++ b/src/thread.h
@@ -256,7 +256,9 @@
return id_;
}
- pid_t GetTid() const;
+ pid_t GetTid() const {
+ return tid_;
+ }
pthread_t GetImpl() const {
return handle_;
@@ -442,6 +444,9 @@
~Thread();
friend class Runtime; // For ~Thread.
+ void DumpState(std::ostream& os) const;
+ void DumpStack(std::ostream& os) const;
+
void InitCpu();
void InitFunctionPointers();
@@ -450,6 +455,12 @@
// Managed thread id.
uint32_t id_;
+ // System thread id.
+ pid_t tid_;
+
+ // Native thread handle.
+ pthread_t handle_;
+
// FIXME: placeholder for the gc cardTable
uint32_t card_table_;
@@ -470,9 +481,6 @@
State state_;
- // Native thread handle.
- pthread_t handle_;
-
// Initialized to "this". On certain architectures (such as x86) reading
// off of Thread::Current is easy but getting the address of Thread::Current
// is hard. This field can be read off of Thread::Current to give the address.
@@ -515,6 +523,8 @@
~ThreadList();
+ void Dump(std::ostream& os);
+
void Register(Thread* thread);
void Unregister(Thread* thread);