diff options
author | Ori Bernstein <ori@eigenstate.org> | 2023-12-18 00:42:47 +0000 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2023-12-18 00:42:47 +0000 |
commit | 5e336b9d966e766e821d5ee6251737f478104ba7 (patch) | |
tree | 699e767d68b71d7a48ab6be0411b2e84aa962753 | |
parent | e33798c7e0333e6b8c39be76c7b143834d81b81e (diff) |
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.
-rw-r--r-- | sys/src/9/port/qlock.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/src/9/port/qlock.c b/sys/src/9/port/qlock.c index 2c35c826a..b4da75874 100644 --- a/sys/src/9/port/qlock.c +++ b/sys/src/9/port/qlock.c @@ -79,6 +79,7 @@ qlock(QLock *q) lock(&q->use); rwstats.qlock++; if(!q->locked) { + q->use.pc = getcallerpc(&q); q->locked = 1; unlock(&q->use); return; |