Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/cobalt/cobalt malloc(9) -> kmem(9)



details:   https://anonhg.NetBSD.org/src/rev/c92401d089a1
branches:  trunk
changeset: 978413:c92401d089a1
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Nov 21 15:26:53 2020 +0000

description:
malloc(9) -> kmem(9)

diffstat:

 sys/arch/cobalt/cobalt/interrupt.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (42 lines):

diff -r 06b9cb6f5702 -r c92401d089a1 sys/arch/cobalt/cobalt/interrupt.c
--- a/sys/arch/cobalt/cobalt/interrupt.c        Sat Nov 21 15:02:52 2020 +0000
+++ b/sys/arch/cobalt/cobalt/interrupt.c        Sat Nov 21 15:26:53 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: interrupt.c,v 1.10 2019/11/10 21:16:25 chs Exp $       */
+/*     $NetBSD: interrupt.c,v 1.11 2020/11/21 15:26:53 thorpej Exp $   */
 
 /*-
  * Copyright (c) 2006 Izumi Tsutsui.  All rights reserved.
@@ -79,12 +79,12 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.10 2019/11/10 21:16:25 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.11 2020/11/21 15:26:53 thorpej Exp $");
 
 #define __INTR_PRIVATE
 
 #include <sys/param.h>
-#include <sys/malloc.h>
+#include <sys/kmem.h>
 #include <sys/cpu.h>
 #include <sys/intr.h>
 
@@ -265,7 +265,7 @@
                return NULL;
        }
 
-       ih = malloc(sizeof(*ih), M_DEVBUF, M_WAITOK);
+       ih = kmem_alloc(sizeof(*ih), KM_SLEEP);
        ih->ih_func = func;
        ih->ih_arg = arg;
        ih->ih_irq = irq;
@@ -306,7 +306,7 @@
                        icu_set();
                }
                splx(s);
-               free(ih, M_DEVBUF);
+               kmem_free(ih, sizeof(*ih));
        }
 }
 



Home | Main Index | Thread Index | Old Index