Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/modules/examples/pollpal s/&&/&/ and also return POLLRDN...



details:   https://anonhg.NetBSD.org/src/rev/ef5175e2dd7c
branches:  trunk
changeset: 1009736:ef5175e2dd7c
user:      christos <christos%NetBSD.org@localhost>
date:      Fri May 01 21:42:34 2020 +0000

description:
s/&&/&/ and also return POLLRDNORM (pointed out by joerg@)

diffstat:

 sys/modules/examples/pollpal/pollpal.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r de502e5cbc9f -r ef5175e2dd7c sys/modules/examples/pollpal/pollpal.c
--- a/sys/modules/examples/pollpal/pollpal.c    Fri May 01 21:35:30 2020 +0000
+++ b/sys/modules/examples/pollpal/pollpal.c    Fri May 01 21:42:34 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pollpal.c,v 1.2 2020/04/30 07:07:22 mrg Exp $  */ 
+/*     $NetBSD: pollpal.c,v 1.3 2020/05/01 21:42:34 christos Exp $     */ 
 
 /*-
 * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
 */ 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pollpal.c,v 1.2 2020/04/30 07:07:22 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pollpal.c,v 1.3 2020/05/01 21:42:34 christos Exp $");
 
 #include <sys/module.h>
 #include <sys/param.h>
@@ -281,9 +281,9 @@
                }
                break;
        case WRITE_WAITING:
-               if (events && (POLLIN | POLLRDNORM)) {
+               if (events & (POLLIN | POLLRDNORM)) {
                        /* When device is in WRITE_WAITING state it can read. */
-                       revents |= POLLIN;
+                       revents |= POLLIN | POLLRDNORM;
                } else {
                        /* Record the request if it wasn't satisfied. */
                        selrecord(curlwp, &pl->psel);



Home | Main Index | Thread Index | Old Index