equal
deleted
inserted
replaced
25 #include "fatal-error.h" |
25 #include "fatal-error.h" |
26 #include "system-mutex.h" |
26 #include "system-mutex.h" |
27 #include "log.h" |
27 #include "log.h" |
28 |
28 |
29 |
29 |
|
30 /** |
|
31 * @file |
|
32 * @ingroup thread |
|
33 * Mutex critical section primitive definitions for Unix-like systems. |
|
34 */ |
|
35 |
30 namespace ns3 { |
36 namespace ns3 { |
31 |
37 |
32 NS_LOG_COMPONENT_DEFINE_MASK ("SystemMutex", ns3::LOG_PREFIX_TIME); |
38 NS_LOG_COMPONENT_DEFINE_MASK ("SystemMutex", ns3::LOG_PREFIX_TIME); |
33 |
39 |
|
40 /** System-dependent implementation of SystemMutex. */ |
34 class SystemMutexPrivate { |
41 class SystemMutexPrivate { |
35 public: |
42 public: |
36 SystemMutexPrivate (); |
43 SystemMutexPrivate (); |
37 ~SystemMutexPrivate (); |
44 ~SystemMutexPrivate (); |
38 |
45 |
39 void Lock (void); |
46 void Lock (void); /**< Acquire ownership of the mutex. */ |
40 void Unlock (void); |
47 void Unlock (void); /**< Release ownership of the mutex. */ |
41 private: |
48 private: |
42 pthread_mutex_t m_mutex; |
49 pthread_mutex_t m_mutex; /**< The mutex. */ |
43 }; |
50 }; |
44 |
51 |
45 SystemMutexPrivate::SystemMutexPrivate () |
52 SystemMutexPrivate::SystemMutexPrivate () |
46 { |
53 { |
47 NS_LOG_FUNCTION (this); |
54 NS_LOG_FUNCTION (this); |