summaryrefslogtreecommitdiff
path: root/tools/section_lock.h
blob: a054005dd6f11e784ed2d107a0ed97e544914f00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
 * section_lock.h:
 *
 * See the main source file 'xineliboutput.c' for copyright information and
 * how to reach the author.
 *
 * $Id: section_lock.h,v 1.1 2010-03-15 12:07:44 phintuka Exp $
 *
 */

#ifndef __SECTION_LOCK_H
#define __SECTION_LOCK_H

#include <vdr/thread.h>

class cSectionLock {
  private:
    cMutex& mutex;
  public:
    cSectionLock(cMutex& Mutex) : mutex(Mutex) { mutex.Lock(); };
    ~cSectionLock() { mutex.Unlock(); };
};

#endif // __SECTION_LOCK_H