2007-06-11 21:36:57 +00:00
|
|
|
#include <stasis/transactional.h>
|
2005-02-09 02:53:14 +00:00
|
|
|
|
2005-02-10 03:51:09 +00:00
|
|
|
typedef struct {
|
|
|
|
void (*init)();
|
2008-10-03 02:42:25 +00:00
|
|
|
int (*readLockPage) (int xid, pageid_t page);
|
|
|
|
int (*writeLockPage) (int xid, pageid_t page);
|
|
|
|
int (*unlockPage) (int xid, pageid_t page);
|
2005-02-10 03:51:09 +00:00
|
|
|
int (*readLockRecord) (int xid, recordid rid);
|
|
|
|
int (*writeLockRecord)(int xid, recordid rid);
|
|
|
|
int (*unlockRecord) (int xid, recordid rid);
|
|
|
|
int (*begin) (int xid);
|
|
|
|
int (*commit) (int xid);
|
|
|
|
int (*abort) (int xid);
|
|
|
|
} LockManagerSetup;
|
|
|
|
|
|
|
|
extern LockManagerSetup globalLockManager;
|
|
|
|
|
2005-02-09 02:53:14 +00:00
|
|
|
void lockManagerInit();
|
|
|
|
|
2011-06-12 08:13:34 +00:00
|
|
|
int lockManagerReadLockRecord(int xid, recordid rid);
|
|
|
|
int lockManagerWriteLockRecord(int xid, recordid rid);
|
2005-02-09 02:53:14 +00:00
|
|
|
|
|
|
|
int lockManagerUnlockRecord(int xid, recordid rid);
|
2005-02-10 03:51:09 +00:00
|
|
|
int lockManagerCommit(int xid);
|
|
|
|
|
|
|
|
void setupLockManagerCallbacksRecord();
|
|
|
|
void setupLockManagerCallbacksPage();
|
|
|
|
void setupLockManagerCallbacksNil();
|