Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

MutexLock.cc

Go to the documentation of this file.
00001 #include "MutexLock.h"
00002 
00003 unsigned int MutexLockBase::usleep_granularity=5000;
00004 
00005 #if !defined(PLATFORM_APERIOS) && !defined(MUTEX_LOCK_ET_USE_SOFTWARE_ONLY)
00006 #  if !defined(TEKKOTSU_SHM_STYLE) || TEKKOTSU_SHM_STYLE==NO_SHM
00007 #  else
00008 void MutexLockBase::setSemaphoreManager(SemaphoreManager* mgr) {
00009   if(mgr==NULL) {
00010     preallocated=*semgr;
00011     semgr=&preallocated;
00012   } else {
00013     *mgr=*semgr;
00014     semgr=mgr;
00015   }
00016 }
00017 void MutexLockBase::aboutToFork() {
00018   preallocated.aboutToFork();
00019 }
00020 SemaphoreManager MutexLockBase::preallocated;
00021 SemaphoreManager* MutexLockBase::semgr=&preallocated;
00022 #  endif
00023 #endif
00024 
00025 /*! @file 
00026 * @brief Defines MutexLock, a software only mutual exclusion lock.
00027 * @author ejt (Creator), Edward A. Lycklama, Vassos Hadzilacos (paper from which this was based)
00028 */

Tekkotsu v5.1CVS
Generated Mon May 9 04:58:45 2016 by Doxygen 1.6.3