#ifndef SYNCH_PRIM_H
#define SYNCH_PRIM_H

class CMutexLock
{
public:
   CMutexLock( pthread_mutex_t& m )
      : m_mutex( &m )
   {
      pthread_mutex_lock( m_mutex );
   }
   
   ~CMutexLock()
   {
      pthread_mutex_unlock( m_mutex );
   }

private:
   pthread_mutex_t* m_mutex;
};

#endif 
