ref: 5e336b9d966e766e821d5ee6251737f478104ba7
parent: e33798c7e0333e6b8c39be76c7b143834d81b81e
author: Ori Bernstein <ori@eigenstate.org>
date: Sun Dec 17 19:42:47 EST 2023
qlock: keep the caller pc in the qlock for debugging Keeping the PC for the qlock call isn't very useful, since it's always going to be the same PC. Instead, set the Lock's pc to the pc of the QLock locker.
--- a/sys/src/9/port/qlock.c
+++ b/sys/src/9/port/qlock.c
@@ -79,6 +79,7 @@
lock(&q->use);
rwstats.qlock++;
if(!q->locked) {
+ q->use.pc = getcallerpc(&q);
q->locked = 1;
unlock(&q->use);
return;