RDFS
The Rice Comp413 2017 class' continuation on the work of the 2016 RDFS.
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | List of all members
lru::NullLock Class Reference

#include <LRUCache.h>

Inheritance diagram for lru::NullLock:
lru::Lock

Public Member Functions

void lock ()
 
void unlock ()
 

Detailed Description

Null or noop lock class that is the default synchronization used in lru cache.

a simple pthread based lock would look like this:

        class MutexLock : public Lock {
public:
MutexLock() { ::pthread_mutex_init(&m_lock, 0); }
virtual ~MutexLock() { ::pthread_mutex_destroy(&m_lock); }
void lock() { ::pthread_mutex_lock(&m_lock); }
void unlock() { ::pthread_mutex_unlock(&m_lock); }
private:
pthread_mutex_t m_lock;
}
    

The documentation for this class was generated from the following file: