+public:
+ explicit thread_info (inferior *inf, ptid_t ptid);
+ ~thread_info ();
+
+ bool deletable () const
+ {
+ /* If this is the current thread, or there's code out there that
+ relies on it existing (m_refcount > 0) we can't delete yet. */
+ return (m_refcount == 0 && !ptid_equal (ptid, inferior_ptid));
+ }
+
+ /* Increase the refcount. */
+ void incref ()
+ {
+ gdb_assert (m_refcount >= 0);
+ m_refcount++;
+ }
+
+ /* Decrease the refcount. */
+ void decref ()
+ {
+ m_refcount--;
+ gdb_assert (m_refcount >= 0);
+ }
+
+ struct thread_info *next = NULL;