1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-11 07:17:58 +00:00

api.c trylock() add missing locklock

This commit is contained in:
Kano 2013-11-14 01:17:57 +11:00 committed by Noel Maersk
parent d976abe12d
commit 89000ffb1a

4
api.c
View File

@ -1393,10 +1393,14 @@ uint64_t api_trylock(void *lock, const char *file, const char *func, const int l
LOCKINFO *info; LOCKINFO *info;
uint64_t id; uint64_t id;
locklock();
info = findlock(lock, CGLOCK_UNKNOWN, file, func, linenum); info = findlock(lock, CGLOCK_UNKNOWN, file, func, linenum);
id = lock_id++; id = lock_id++;
addgettry(info, id, file, func, linenum, false); addgettry(info, id, file, func, linenum, false);
lockunlock();
return id; return id;
} }