Source-Changes-HG archive

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

[src/trunk]: src/sys/kern * replace incorrect M_WAITOK flag from pool_get() b...



details:   https://anonhg.NetBSD.org/src/rev/c2b8bd73a435
branches:  trunk
changeset: 559859:c2b8bd73a435
user:      pooka <pooka%NetBSD.org@localhost>
date:      Wed Mar 24 20:25:28 2004 +0000

description:
* replace incorrect M_WAITOK flag from pool_get() by proper PR_WAITOK
  and remove redundant check for NULL return value
* switch pool page allocator to nointr allocator

jdolecek sayeth ok

diffstat:

 sys/kern/sys_pipe.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (38 lines):

diff -r b448bf7a1d87 -r c2b8bd73a435 sys/kern/sys_pipe.c
--- a/sys/kern/sys_pipe.c       Wed Mar 24 20:20:44 2004 +0000
+++ b/sys/kern/sys_pipe.c       Wed Mar 24 20:25:28 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sys_pipe.c,v 1.54 2004/03/24 15:34:53 atatat Exp $     */
+/*     $NetBSD: sys_pipe.c,v 1.55 2004/03/24 20:25:28 pooka Exp $      */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -83,7 +83,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_pipe.c,v 1.54 2004/03/24 15:34:53 atatat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_pipe.c,v 1.55 2004/03/24 20:25:28 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -315,9 +315,7 @@
        struct pipe *pipe;
        int error;
 
-       pipe = *pipep = pool_get(&pipe_pool, M_WAITOK);
-       if (pipe == NULL)
-               return (ENOMEM);
+       pipe = *pipep = pool_get(&pipe_pool, PR_WAITOK);
 
        /* Initialize */ 
        memset(pipe, 0, sizeof(struct pipe));
@@ -1516,5 +1514,7 @@
 void
 pipe_init(void)
 {
-       pool_init(&pipe_pool, sizeof(struct pipe), 0, 0, 0, "pipepl", NULL);
+
+       pool_init(&pipe_pool, sizeof(struct pipe), 0, 0, 0, "pipepl",
+           &pool_allocator_nointr);
 }



Home | Main Index | Thread Index | Old Index