Print this page
3006 VERIFY[S,U,P] and ASSERT[S,U,P] frequently check if first argument is zero

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/disp/sysdc.c
          +++ new/usr/src/uts/common/disp/sysdc.c
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
       23 + * Copyright (c) 2012 by Delphix. All rights reserved.
  23   24   */
  24   25  
  25   26  /*
  26   27   * The System Duty Cycle (SDC) scheduling class
  27   28   * --------------------------------------------
  28   29   *
  29   30   * Background
  30   31   *
  31   32   * Kernel threads in Solaris have traditionally not been large consumers
  32   33   * of CPU time.  They typically wake up, perform a small amount of
↓ open down ↓ 1265 lines elided ↑ open up ↑
1298 1299  
1299 1300          ASSERT(sysdc_param_init);
1300 1301          ASSERT(sysdccid >= 0);
1301 1302  
1302 1303          ASSERT((flags & ~SYSDC_THREAD_BATCH) == 0);
1303 1304  
1304 1305          sdp.sdp_minpri = sysdc_minpri;
1305 1306          sdp.sdp_maxpri = sysdc_maxpri;
1306 1307          sdp.sdp_DC = MAX(MIN(dc, sysdc_maxDC), sysdc_minDC);
1307 1308  
1308      -        VERIFY3U(CL_ALLOC(&buf, sysdccid, KM_SLEEP), ==, 0);
     1309 +        VERIFY0(CL_ALLOC(&buf, sysdccid, KM_SLEEP));
1309 1310  
1310 1311          ASSERT(t->t_lwp != NULL);
1311 1312          ASSERT(t->t_cid == syscid);
1312 1313          ASSERT(t->t_cldata == NULL);
1313      -        VERIFY3U(CL_CANEXIT(t, NULL), ==, 0);
1314      -        VERIFY3U(CL_ENTERCLASS(t, sysdccid, &sdp, kcred, buf), ==, 0);
     1314 +        VERIFY0(CL_CANEXIT(t, NULL));
     1315 +        VERIFY0(CL_ENTERCLASS(t, sysdccid, &sdp, kcred, buf));
1315 1316          CL_EXITCLASS(syscid, NULL);
1316 1317  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX