From c91bd3283a44946fd420ce68c43580aa0d327546 Mon Sep 17 00:00:00 2001 From: rsc Date: Fri, 5 Mar 2004 02:25:41 +0000 Subject: Pipes cannot use SOCK_DGRAM. Back to SOCK_STREAM. Add debugging to fdwait. Rewrite getcallerpc on PowerMac to be correct. --- src/lib9/getcallerpc-PowerMacintosh.c | 7 +++++++ src/lib9/getcallerpc-PowerMacintosh.s | 5 ----- src/lib9/pipe.c | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 src/lib9/getcallerpc-PowerMacintosh.c delete mode 100644 src/lib9/getcallerpc-PowerMacintosh.s (limited to 'src/lib9') diff --git a/src/lib9/getcallerpc-PowerMacintosh.c b/src/lib9/getcallerpc-PowerMacintosh.c new file mode 100644 index 00000000..679a72cf --- /dev/null +++ b/src/lib9/getcallerpc-PowerMacintosh.c @@ -0,0 +1,7 @@ +#include + +ulong +getcallerpc(void *x) +{ + return (((ulong*)(x))[-4]); +} diff --git a/src/lib9/getcallerpc-PowerMacintosh.s b/src/lib9/getcallerpc-PowerMacintosh.s deleted file mode 100644 index 3571b744..00000000 --- a/src/lib9/getcallerpc-PowerMacintosh.s +++ /dev/null @@ -1,5 +0,0 @@ -.text -.globl _getcallerpc -_getcallerpc: - mflr r3 - blr diff --git a/src/lib9/pipe.c b/src/lib9/pipe.c index 5d0e47c1..f9fe2420 100644 --- a/src/lib9/pipe.c +++ b/src/lib9/pipe.c @@ -6,5 +6,5 @@ int p9pipe(int fd[2]) { - return socketpair(AF_UNIX, SOCK_DGRAM, 0, fd); + return socketpair(AF_UNIX, SOCK_STREAM, 0, fd); } -- cgit v1.2.3