From 37ff2022b844a6deab6f2102290433c9f8eac9e8 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Thu, 3 Jun 1999 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1999-06-03 --- port/alloc.c | 2 +- port/portfns.h | 1 + port/qio.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/port/alloc.c b/port/alloc.c index 773d530e64ddcf2345668b479ea1baf7e737b8dc..74772111fb23fbb7a7388c9cc7ba0aa159086159 100644 --- a/port/alloc.c +++ b/port/alloc.c @@ -360,7 +360,7 @@ poolread(char *va, int count, ulong offset) return n; } -static void +void tagwithpc(void *v, ulong pc) { Bhdr *h; diff --git a/port/portfns.h b/port/portfns.h index 0921bb6d942d5307d3d92d44c2fe9f7bf7be989a..5b1d5fbadcbc1f61339cfd8c0442a9ef030e4569 100644 --- a/port/portfns.h +++ b/port/portfns.h @@ -304,6 +304,7 @@ void srvrecover(Chan*, Chan*); int swapcount(ulong); int swapfull(void); void swapinit(void); +void tagwithpc(void*, ulong); vlong todget(vlong*); void todfix(void); void todsetfreq(vlong); diff --git a/port/qio.c b/port/qio.c index a59af31b0cd831dee93c10b5f3d2d408b261f6ab..80de40757a1078ff6b3af9457b1d7ed0a9172461 100644 --- a/port/qio.c +++ b/port/qio.c @@ -974,6 +974,7 @@ qwrite(Queue *q, void *vp, int len) n = Maxatomic; b = allocb(n); + tagwithpc(b, (up->text[0]<<24)|(up->text[1]<<16)|(up->text[2]<<8)|up->text[3]); if(waserror()){ freeb(b); nexterror();