Enderal SE
https://mod.pub/enderal-se/38-enderal-se
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
443 B
24 lines
443 B
#pragma once
|
|
|
|
#include "common/ICriticalSection.h"
|
|
#include "common/IEvent.h"
|
|
#include "common/IInterlockedLong.h"
|
|
|
|
class IReadWriteLock
|
|
{
|
|
public:
|
|
IReadWriteLock();
|
|
~IReadWriteLock();
|
|
|
|
void StartRead(void);
|
|
void EndRead(void);
|
|
void StartWrite(void);
|
|
void EndWrite(void);
|
|
|
|
private:
|
|
IEvent readBlocker;
|
|
IEvent writeBlocker;
|
|
ICriticalSection enterBlocker;
|
|
ICriticalSection writeMutex;
|
|
IInterlockedLong readCount;
|
|
};
|
|
|