Attention is currently required from: Nico Huber, Subrata Banik, Edward O'Callaghan.
4 comments:
File big_lock.c:
Patch Set #1, Line 39: return acquire_lock(&big_lock, timeout_secs * 1000);
should we check #if BIG_LOCK and decide if lock is required?
File flashrom.c:
#ifndef USE_BIG_LOCK
#define USE_BIG_LOCK 0
#endif
Not really used?
/* Get big lock before doing any work that touches hardware. */
msg_gdbg("Acquiring lock (timeout=%d sec)...\n", LOCK_TIMEOUT_SECS);
if (acquire_big_lock(LOCK_TIMEOUT_SECS) < 0) {
msg_gerr("Could not acquire lock.\n");
return -1;
}
big_lock_acquired = true;
msg_gdbg("Lock acquired.\n");
If we're going to have a big_lock.c, I think the implementation here should only contain the timeout, not the status and debug messages; e.g.,
if (acquire_big_lock(LOCK_TIMEOUT_SECS) < 0)
return -1;
And move all other logic into acquire_big_lock itself. WDYT?
if (big_lock_acquired) {
release_big_lock();
big_lock_acquired = false;
}
we should just call release_big_lock() and let it check/handle big_lock_acquired internally
To view, visit change 62213. To unsubscribe, or for help writing mail filters, visit settings.