diff options
author | Fred Deng <fred.deng@soundunited.com> | 2018-04-27 12:56:19 +1000 |
---|---|---|
committer | Fred Deng <fred.deng@soundunited.com> | 2018-04-27 12:56:19 +1000 |
commit | 1cb01252c0b64b572c9d567a7c3a145d364dd12b (patch) | |
tree | 9316b79cfb0b23198dde0f8fb10a23c64f44174b | |
parent | 15fba8379f3a9e4ff0428cc3e4292aad40e485b1 (diff) | |
download | Open-AVB-1cb01252c0b64b572c9d567a7c3a145d364dd12b.tar.gz |
Change to using addEventTimer and deleteEventTimer without lock.
-rw-r--r-- | daemons/gptp/common/avbts_clock.hpp | 6 | ||||
-rw-r--r-- | daemons/gptp/common/common_port.cpp | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/daemons/gptp/common/avbts_clock.hpp b/daemons/gptp/common/avbts_clock.hpp index 614464c2..22a72464 100644 --- a/daemons/gptp/common/avbts_clock.hpp +++ b/daemons/gptp/common/avbts_clock.hpp @@ -162,7 +162,9 @@ private: OSLock *timerq_lock; - /** +public: + + /** * @brief Add a new event to the timer queue * @param target EtherPort target * @param e Event to be added @@ -179,7 +181,7 @@ private: * @return void */ void deleteEventTimer( CommonPort *target, Event e ); -public: + /** * @brief Instantiates a IEEE 1588 Clock * @param forceOrdinarySlave Forces it to be an ordinary slave diff --git a/daemons/gptp/common/common_port.cpp b/daemons/gptp/common/common_port.cpp index c11f5bef..dc47d9d2 100644 --- a/daemons/gptp/common/common_port.cpp +++ b/daemons/gptp/common/common_port.cpp @@ -298,8 +298,8 @@ void CommonPort::startSyncReceiptTimer { clock->getTimerQLock(); syncReceiptTimerLock->lock(); - clock->deleteEventTimerLocked( this, SYNC_RECEIPT_TIMEOUT_EXPIRES ); - clock->addEventTimerLocked + clock->deleteEventTimer( this, SYNC_RECEIPT_TIMEOUT_EXPIRES ); + clock->addEventTimer ( this, SYNC_RECEIPT_TIMEOUT_EXPIRES, waitTime ); syncReceiptTimerLock->unlock(); clock->putTimerQLock(); @@ -309,7 +309,7 @@ void CommonPort::stopSyncReceiptTimer( void ) { clock->getTimerQLock(); syncReceiptTimerLock->lock(); - clock->deleteEventTimerLocked( this, SYNC_RECEIPT_TIMEOUT_EXPIRES ); + clock->deleteEventTimer( this, SYNC_RECEIPT_TIMEOUT_EXPIRES ); syncReceiptTimerLock->unlock(); clock->putTimerQLock(); } |