wakeup all pending locks at once. This change means that we only
trigger this anti-stampede code for write locks, as for pending read
locks the correct behaviour is to stampede (as they will all succeed)
if (last_notice != -1 && brl_overlap(&locks[i], &locks[last_notice])) {
continue;
}
- last_notice = i;
+ if (locks[i].lock_type == PENDING_WRITE_LOCK) {
+ last_notice = i;
+ }
data.data = (void *)&locks[i].notify_ptr;
data.length = sizeof(void *);
messaging_send(brl->messaging_ctx, locks[i].context.server, MSG_BRL_RETRY, &data);