105 {LockContext.UnLock();
106 std::cerr <<
"XSLock: Attempt to unlock inactive lock." <<std::endl;
107 throw "XSLock: unlocking inactive lock.";
113 {LockContext.UnLock();
114 std::cerr <<
"XSLock: Incorrect unlock usage - "
115 << (cur_usage ==
xs_Shared ?
"shr" :
"exc") <<
"!="
117 throw "XSLock: invalid unlock usage specified.";
126 if (exc_wait && (toggle || !shr_wait))
127 {toggle = 0; WantExc.Post(); exc_wait--;}
128 else {
while(shr_wait) {WantShr.Post(); shr_wait--;}
130 else if (!toggle) {
while(shr_wait) {WantShr.Post(); shr_wait--;}
133 LockContext.UnLock();