From 89000ffb1aed01980edfc369a7b17574f88efe61 Mon Sep 17 00:00:00 2001 From: Kano Date: Thu, 14 Nov 2013 01:17:57 +1100 Subject: [PATCH] api.c trylock() add missing locklock --- api.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api.c b/api.c index d8522ea3..88319176 100644 --- a/api.c +++ b/api.c @@ -1393,10 +1393,14 @@ uint64_t api_trylock(void *lock, const char *file, const char *func, const int l LOCKINFO *info; uint64_t id; + locklock(); + info = findlock(lock, CGLOCK_UNKNOWN, file, func, linenum); id = lock_id++; addgettry(info, id, file, func, linenum, false); + lockunlock(); + return id; }