File: CSync.h

package info (click to toggle)
fireflier 1.1.6-3etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 3,348 kB
  • ctags: 1,167
  • sloc: sh: 9,023; cpp: 8,370; makefile: 437; ansic: 300
file content (32 lines) | stat: -rw-r--r-- 292 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
25
26
27
28
29
30
31
32
#ifndef _CSYNC_H_
#define _CSYNC_H_

#include <glibmm/thread.h>


class CSync
{
	Glib::Mutex m_sync;
	Glib::Mutex::Lock m_lock;


public:
	CSync()
		: m_lock(m_sync, Glib::NOT_LOCK)
	{
	}

	
public:
	void lock()
	{
		m_lock.acquire();
	}
	
	void unlock()
	{
		m_lock.release();
	}
};

#endif