Changeset 3:3aad07da974e in rrlib_watchdog


Ignore:
Timestamp:
06.07.2012 01:54:54 (9 years ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
default
Phase:
public
Message:

Adapted to introduction of rrlib_thread.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • tWatchDog.cpp

    r2 r3  
    106106    { 
    107107      time::tTimestamp cur_time = rrlib::time::Now(); 
    108       finroc::util::tLock l(task_list_mutex); 
     108      rrlib::thread::tLock l(task_list_mutex); 
    109109      for (std::vector<tWatchDogTask*>::iterator it = task_list.begin(); it < task_list.end(); it++) 
    110110      { 
  • tWatchDog.h

    r0 r3  
    4242// External includes (system with <>, local with "") 
    4343//---------------------------------------------------------------------- 
    44 #include "rrlib/finroc_core_utils/thread/tThread.h" 
     44#include "rrlib/thread/tThread.h" 
    4545#include "rrlib/util/patterns/singleton.h" 
    4646 
     
    7171 * the watchdog will notify the user and execute a custom action. 
    7272 */ 
    73 class tWatchDog : public finroc::util::tThread 
     73class tWatchDog : public rrlib::thread::tThread 
    7474{ 
    7575  friend class tWatchDogTask; 
     
    107107 
    108108  /*! Mutex for task list */ 
    109   finroc::util::tMutex task_list_mutex; 
     109  rrlib::thread::tMutex task_list_mutex; 
    110110}; 
    111111 
  • tWatchDogTask.cpp

    r2 r3  
    7878  { 
    7979    tWatchDog& i = tWatchDog::GetInstance(); 
    80     finroc::util::tLock lock(i.task_list_mutex); 
     80    rrlib::thread::tLock lock(i.task_list_mutex); 
    8181    i.task_list.push_back(this); 
    8282  } 
     
    9191  { 
    9292    tWatchDog& i = tWatchDog::GetInstance(); 
    93     finroc::util::tLock lock(i.task_list_mutex); 
     93    rrlib::thread::tLock lock(i.task_list_mutex); 
    9494    i.task_list.erase(std::remove(i.task_list.begin(), i.task_list.end(), this), i.task_list.end()); // Remove this task from list 
    9595  } 
Note: See TracChangeset for help on using the changeset viewer.