Browse Source

ft: fix

master
SisMaker 1 year ago
parent
commit
8e85846f9f
4 changed files with 2 additions and 2 deletions
  1. +2
    -2
      c_src/eNifLock/eNifLock.cc
  2. BIN
      priv/eNifLock.dll
  3. BIN
      priv/eNifLock.exp
  4. BIN
      priv/eNifLock.lib

+ 2
- 2
c_src/eNifLock/eNifLock.cc View File

@ -18,8 +18,7 @@ typedef struct KeyNode_r{
bool isNotCurLocked(KeyNode *LockedHead, int KeyIx){ bool isNotCurLocked(KeyNode *LockedHead, int KeyIx){
KeyNode *temp = LockedHead; KeyNode *temp = LockedHead;
while (temp != NULL){ while (temp != NULL){
if (temp->KeyIx == KeyIx)
return false;
if (temp->KeyIx == KeyIx) return false;
temp = temp->next; temp = temp->next;
} }
return true; return true;
@ -73,6 +72,7 @@ ERL_NIF_TERM tryLock(ErlNifEnv *env, int, const ERL_NIF_TERM argv[]){
LockSlot[temp->KeyIx].compare_exchange_strong(RExpected, 0); LockSlot[temp->KeyIx].compare_exchange_strong(RExpected, 0);
temp = temp->next; temp = temp->next;
} }
return atomFalse;
} }
} }
} }

BIN
priv/eNifLock.dll View File


BIN
priv/eNifLock.exp View File


BIN
priv/eNifLock.lib View File


Loading…
Cancel
Save