summaryrefslogblamecommitdiff
path: root/Source/Kernel/TaskManager/Mutex.class.h
blob: 298ed9c34563d5d3c3387d47b4a2cfb9a0d37289 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                                                                                                                     
#ifndef DEF_MUTEX_CLASS_H
#define DEF_MUTEX_CLASS_H

class Mutex {
	private:
	bool m_locked;

	public:
	Mutex(bool locked = false);
	bool lock();		//Locks the mutex if it is not locked. Returns true if mutex could be locked, false if already locked
	void waitLock();	//Locks the mutex, waiting for it to be unlocked before if necessary
	void unlock();
	bool locked();
};

#endif