Source-Changes-HG archive

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

[src/netbsd-1-4]: src/sys/dev pullup 1.15->1.16 (pk): deal with missing "rais...



details:   https://anonhg.NetBSD.org/src/rev/40ffdc155070
branches:  netbsd-1-4
changeset: 468961:40ffdc155070
user:      perry <perry%NetBSD.org@localhost>
date:      Thu Jun 24 16:15:59 1999 +0000

description:
pullup 1.15->1.16 (pk): deal with missing "raise interrupt level" code

diffstat:

 sys/dev/rnd.c |  14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diffs (47 lines):

diff -r c973e29a8511 -r 40ffdc155070 sys/dev/rnd.c
--- a/sys/dev/rnd.c     Thu Jun 24 16:14:35 1999 +0000
+++ b/sys/dev/rnd.c     Thu Jun 24 16:15:59 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rnd.c,v 1.15 1999/04/01 19:07:40 explorer Exp $        */
+/*     $NetBSD: rnd.c,v 1.15.2.1 1999/06/24 16:15:59 perry Exp $       */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -671,8 +671,11 @@
 rnd_sample_allocate(rndsource_t *source)
 {
        rnd_sample_t *c;
+       int s;
 
-       c = pool_get(&rnd_mempool, M_WAITOK);
+       s = splhigh();
+       c = pool_get(&rnd_mempool, PR_WAITOK);
+       splx(s);
        if (c == NULL)
                return (NULL);
 
@@ -690,8 +693,11 @@
 rnd_sample_allocate_isr(rndsource_t *source)
 {
        rnd_sample_t *c;
+       int s;
 
+       s = splhigh();
        c = pool_get(&rnd_mempool, 0);
+       splx(s);
        if (c == NULL)
                return (NULL);
 
@@ -705,8 +711,12 @@
 static void
 rnd_sample_free(rnd_sample_t *c)
 {
+       int s;
+
        memset(c, 0, sizeof(rnd_sample_t));
+       s = splhigh();
        pool_put(&rnd_mempool, c);
+       splx(s);
 }
 
 /*



Home | Main Index | Thread Index | Old Index