Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Fix check for pending upcalls after we return stacks.



details:   https://anonhg.NetBSD.org/src/rev/ae792aea67ed
branches:  trunk
changeset: 555690:ae792aea67ed
user:      cl <cl%NetBSD.org@localhost>
date:      Tue Nov 25 10:05:17 2003 +0000

description:
Fix check for pending upcalls after we return stacks.
Noted by yamt@.

diffstat:

 sys/kern/kern_sa.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (31 lines):

diff -r c7d9d04700ee -r ae792aea67ed sys/kern/kern_sa.c
--- a/sys/kern/kern_sa.c        Tue Nov 25 09:15:50 2003 +0000
+++ b/sys/kern/kern_sa.c        Tue Nov 25 10:05:17 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_sa.c,v 1.44 2003/11/17 22:57:52 cl Exp $  */
+/*     $NetBSD: kern_sa.c,v 1.45 2003/11/25 10:05:17 cl Exp $  */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_sa.c,v 1.44 2003/11/17 22:57:52 cl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sa.c,v 1.45 2003/11/25 10:05:17 cl Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -276,7 +276,11 @@
                SLIST_INSERT_HEAD(&sa->sa_stackslist, sast, sast_list);
        }
 
-       if (SLIST_EMPTY(&sa->sa_stackslist) && (sa->sa_wokenq_head != NULL))
+       /*
+        * Check if there are any pending upcalls we didn't make
+        * because there were not enough stacks.
+        */
+       if (sa->sa_wokenq_head != NULL)
                l->l_flag |= L_SA_UPCALL; 
 
        SA_LWP_STATE_UNLOCK(l, f);



Home | Main Index | Thread Index | Old Index