57 void addLock(
const char *name, pthread_mutex_t *lock);
68 void acquireLock(
int id, pthread_mutex_t *lock);
80 void releaseLock(
int id, pthread_mutex_t *lock);
87 string getLockTable()
const;
93 pthread_mutex_t *lock;
100 vector<Lock> lockArray;
103 Lock* findLock(pthread_mutex_t *lp) {
104 for (
unsigned int i = 0; i < lockArray.size(); i++) {
105 if (lockArray[i].lock == lp)
return &lockArray[i];
109 Lock* findLock(
string name) {
110 for (
unsigned int i = 0; i < lockArray.size(); i++) {
111 if (lockArray[i].name == name)
return &lockArray[i];