Author: dchagin
Date: Tue Mar  3 17:34:09 2009
New Revision: 189313
URL: http://svn.freebsd.org/changeset/base/189313

Log:
  as suggested by jhb@, panic in case the ncpus == 0.
  it helps to catch bugs in the callers.
  
  Approved by:  kib (mentor)
  MFC after:    5 days

Modified:
  head/sys/kern/subr_smp.c

Modified: head/sys/kern/subr_smp.c
==============================================================================
--- head/sys/kern/subr_smp.c    Tue Mar  3 17:16:26 2009        (r189312)
+++ head/sys/kern/subr_smp.c    Tue Mar  3 17:34:09 2009        (r189313)
@@ -366,7 +366,7 @@ smp_rendezvous_cpus(cpumask_t map,
                if (((1 << i) & map) != 0 && !CPU_ABSENT(i))
                        ncpus++;
        if (ncpus == 0)
-               return;
+               panic("ncpus is 0 with map=0x%x", map);
 
        /* obtain rendezvous lock */
        mtx_lock_spin(&smp_ipi_mtx);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to