Add basic global lock to serialise access through upper locking layer.

This commit is contained in:
alexhudson
2009-11-25 10:51:51 +00:00
parent ff0f56784b
commit fc505dbe05
+13
View File
@@ -18,6 +18,15 @@
#include "stored.h"
static XplMutex logicallock_global;
void
LogicalLockInit()
{
XplMutexInit(logicallock_global);
}
/* Acquire the desired logical lock.
* TODO: what if we already hold an equivalent lock? promotion / etc.?
* Return 0 on failure
@@ -29,6 +38,8 @@ LogicalLockGain(StoreClient *client, StoreObject *object, LogicalLockType type)
UNUSED_PARAMETER_REFACTOR(object);
UNUSED_PARAMETER_REFACTOR(type);
XplMutexLock(logicallock_global);
return 1;
}
@@ -41,4 +52,6 @@ LogicalLockRelease(StoreClient *client, StoreObject *object)
{
UNUSED_PARAMETER_REFACTOR(client);
UNUSED_PARAMETER_REFACTOR(object);
XplMutexUnlock(logicallock_global);
}