From fa325e9b42b0bdfb48857d1958d9fb7ceac55151 Mon Sep 17 00:00:00 2001 From: Dan Cross Date: Fri, 10 Jan 2020 14:44:21 +0000 Subject: Trivial changes: whitespace and modes. Remote whitespace at the ends of lines. Remove blank lines from the ends of files. Change modes on source files so that they are not executable. Signed-off-by: Dan Cross --- src/libthread/channel.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/libthread/channel.c') diff --git a/src/libthread/channel.c b/src/libthread/channel.c index cd7750c0..b6b2e3e6 100644 --- a/src/libthread/channel.c +++ b/src/libthread/channel.c @@ -5,10 +5,10 @@ * You have to put locks in all the channels and all the Alt * structures. At the beginning of an alt you have to lock all * the channels, but then to try to actually exec an op you - * have to lock the other guy's alt structure, so that other + * have to lock the other guy's alt structure, so that other * people aren't trying to use him in some other op at the * same time. - * + * * For Plan 9 apps, it's just not worth the extra effort. */ static QLock chanlock; @@ -415,4 +415,3 @@ channbrecvul(Channel *c) return val; return -1; } - -- cgit v1.2.3 From 369923f6fca5a713698dbac76c486ddb28f43721 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 13 Jan 2020 17:00:27 -0500 Subject: libthread: fix nbrecvul, recvul to match man page, Plan 9 They return 0 on failure, not -1. Bug introduced in my original libthread-for-Unix code. Fixes #230. --- src/libthread/channel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libthread/channel.c') diff --git a/src/libthread/channel.c b/src/libthread/channel.c index b6b2e3e6..53af86e6 100644 --- a/src/libthread/channel.c +++ b/src/libthread/channel.c @@ -397,7 +397,7 @@ chanrecvul(Channel *c) if(_chanop(c, CHANRCV, &val, 1) > 0) return val; - return -1; + return 0; } int @@ -413,5 +413,5 @@ channbrecvul(Channel *c) if(_chanop(c, CHANRCV, &val, 0) > 0) return val; - return -1; + return 0; } -- cgit v1.2.3