From 6efe82f1388aef952d326232ebfa97c1b9d52584 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Thu, 4 Apr 1991 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1991-04-04 --- port/stream.c | 2 +- ss/mem.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/port/stream.c b/port/stream.c index 28b5bebcb02bbe3a392e65c991b21e548a18dc7a..f8ad0ed0268eee8762ab6254d5ed26f429df4a98 100644 --- a/port/stream.c +++ b/port/stream.c @@ -1249,7 +1249,7 @@ streamwrite(Chan *c, void *a, long n, int docopy) if(q->other->flag & QHUNGUP) error(Ehungup); - if(!docopy && GLOBAL(a)){ + if(!docopy && isphys(a)){ /* * `a' is global to the whole system, just create a * pointer to it and pass it on. diff --git a/ss/mem.h b/ss/mem.h index 354bd05e8e06255f40b169f77197a32068d50e4c..b2abcdf1cbc0cf333fbe690a137099f6ad82d0fd 100644 --- a/ss/mem.h +++ b/ss/mem.h @@ -131,3 +131,5 @@ #define NSEG 5 #define MACHSIZE 4096 + +#define isphys(x) ((((ulong)(x)&0xF0000000) == KZERO)