~ubuntu-branches/ubuntu/precise/crossroads/precise

« back to all changes in this revision

Viewing changes to xr/ThreadsAndMutexes/mutex/mutex

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Ritter
  • Date: 2010-07-05 16:27:00 UTC
  • Revision ID: james.westby@ubuntu.com-20100705162700-0g08tfav8ee9y51u
Tags: upstream-2.65
ImportĀ upstreamĀ versionĀ 2.65

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef _MUTEX_
 
2
#define _MUTEX_
 
3
 
 
4
#include "sys/sys"
 
5
 
 
6
class Mutex {
 
7
public:
 
8
    static void lock (void *target);
 
9
    static void unlock (void *target);
 
10
 
 
11
private:
 
12
    static void plock (void *target);
 
13
    static std::map<void *,  pthread_mutex_t> s_lock;
 
14
    typedef std::map<void *,  pthread_mutex_t>::iterator mapIterator;
 
15
};
 
16
 
 
17
 
 
18
 
 
19
#endif