File: nullplat.h

package info (click to toggle)
python-visual 3.2.9-4.1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 2,796 kB
  • ctags: 2,664
  • sloc: cpp: 11,958; sh: 8,185; python: 3,709; ansic: 480; makefile: 311
file content (24 lines) | stat: -rw-r--r-- 386 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef NULLPLAT_H
#define NULLPLAT_H

class nullMutex {
  int count;

  public:
  typedef lock<nullMutex> lock;

  nullMutex(int spincount=0, int _count=1) : count(_count) {}

  ~nullMutex() {}

  inline void sync_lock() {}
  inline void count_lock() { count++; }
  inline void sync_unlock() {}
  inline int sync_count() { return count; }

  void clear() {
    count=0;
  }
};

#endif