1.1 --- a/src/core/system-thread.h Tue Nov 10 11:03:04 2009 -0800
1.2 +++ b/src/core/system-thread.h Thu Nov 12 13:01:01 2009 +0100
1.3 @@ -42,7 +42,7 @@
1.4 *
1.5 * Synchronization between threads is provided via the SystemMutex class.
1.6 */
1.7 -class SystemThread
1.8 +class SystemThread : public SimpleRefCount<SystemThread>
1.9 {
1.10 public:
1.11 /**
1.12 @@ -116,22 +116,6 @@
1.13 ~SystemThread();
1.14
1.15 /**
1.16 - * Increment the reference count. This method should not be called
1.17 - * by user code. Object instances are expected to be used in conjunction
1.18 - * of the Ptr template which would make calling Ref unecessary and
1.19 - * dangerous.
1.20 - */
1.21 - inline void Ref (void) const;
1.22 -
1.23 - /**
1.24 - * Decrement the reference count. This method should not be called
1.25 - * by user code. Object instances are expected to be used in conjunction
1.26 - * of the Ptr template which would make calling Ref unecessary and
1.27 - * dangerous.
1.28 - */
1.29 - inline void Unref (void) const;
1.30 -
1.31 - /**
1.32 * @brief Start a thread of execution, running the provided callback.
1.33 */
1.34 void Start (void);
1.35 @@ -181,26 +165,9 @@
1.36
1.37 private:
1.38 SystemThreadImpl * m_impl;
1.39 - mutable uint32_t m_count;
1.40 bool m_break;
1.41 };
1.42
1.43 - void
1.44 -SystemThread::Ref (void) const
1.45 -{
1.46 - m_count++;
1.47 -}
1.48 -
1.49 - void
1.50 -SystemThread::Unref (void) const
1.51 -{
1.52 - m_count--;
1.53 - if (m_count == 0)
1.54 - {
1.55 - delete this;
1.56 - }
1.57 -}
1.58 -
1.59 } //namespace ns3
1.60
1.61 #endif /* SYSTEM_THREAD_H */