mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 15:02:58 +02:00
@@ -1,23 +0,0 @@
|
||||
#ifndef _CONDITION_ABSTRACTION_H
|
||||
#define _CONDITION_ABSTRACTION_H
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#include "mutex_abstraction.h"
|
||||
|
||||
class Condition
|
||||
{
|
||||
pthread_cond_t mCondition;
|
||||
|
||||
Condition(const Condition&);
|
||||
const Condition& operator=(const Condition&);
|
||||
|
||||
public:
|
||||
Condition();
|
||||
virtual ~Condition();
|
||||
virtual int wait(Mutex* const aMutex);
|
||||
virtual int broadcast();
|
||||
virtual int signal();
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,25 +0,0 @@
|
||||
#ifndef _MUTEX_ABSTRACTION_H
|
||||
#define _MUTEX_ABSTRACTION_H
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
class Mutex
|
||||
{
|
||||
friend class Condition;
|
||||
|
||||
pthread_mutex_t mMutex;
|
||||
|
||||
Mutex(const Mutex&);
|
||||
const Mutex& operator=(const Mutex&);
|
||||
|
||||
protected:
|
||||
explicit Mutex(int);
|
||||
|
||||
public:
|
||||
Mutex();
|
||||
virtual ~Mutex();
|
||||
virtual void lock();
|
||||
virtual void unlock();
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,16 +0,0 @@
|
||||
#ifndef _REENTRANT_MUTEX_H
|
||||
#define _REENTRANT_MUTEX_H
|
||||
|
||||
#include "mutex_abstraction.h"
|
||||
|
||||
class ReentrantMutex : public Mutex
|
||||
{
|
||||
ReentrantMutex(const ReentrantMutex&);
|
||||
const ReentrantMutex& operator=(const ReentrantMutex&);
|
||||
|
||||
public:
|
||||
ReentrantMutex();
|
||||
virtual ~ReentrantMutex();
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,18 +0,0 @@
|
||||
#ifndef _SCOPED_LOCK_H
|
||||
#define _SCOPED_LOCK_H
|
||||
|
||||
#include "mutex_abstraction.h"
|
||||
|
||||
class ScopedLock
|
||||
{
|
||||
Mutex& mMutex;
|
||||
|
||||
ScopedLock(const ScopedLock&);
|
||||
const ScopedLock& operator=(const ScopedLock&);
|
||||
|
||||
public:
|
||||
ScopedLock(Mutex&);
|
||||
~ScopedLock();
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,30 +0,0 @@
|
||||
#ifndef _THREAD_ABSTRACTION_H
|
||||
#define _THREAD_ABSTRACTION_H
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
class Thread
|
||||
{
|
||||
bool mIsRunning;
|
||||
pthread_t mThread;
|
||||
|
||||
static void* runThread(void*);
|
||||
Thread(const Thread&);
|
||||
const Thread& operator=(const Thread&);
|
||||
|
||||
public:
|
||||
Thread();
|
||||
virtual ~Thread();
|
||||
int startThread();
|
||||
int cancelThread();
|
||||
int detachThread();
|
||||
int joinThread();
|
||||
|
||||
int setCancelModeDisable();
|
||||
int setSchedulePriority(int);
|
||||
|
||||
protected:
|
||||
virtual void run() = 0;
|
||||
};
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user