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 ↓ 15 lines elided ↑ open up ↑
  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   23   */
  24   24  
  25   25  /*
       26 + * Copyright (c) 2012 by Delphix. All rights reserved.
       27 + */
       28 +
       29 +/*
  26   30   * The System Duty Cycle (SDC) scheduling class
  27   31   * --------------------------------------------
  28   32   *
  29   33   * Background
  30   34   *
  31   35   * Kernel threads in Solaris have traditionally not been large consumers
  32   36   * of CPU time.  They typically wake up, perform a small amount of
  33   37   * work, then go back to sleep waiting for either a timeout or another
  34   38   * signal.  On the assumption that the small amount of work that they do
  35   39   * is important for the behavior of the whole system, these threads are
↓ open down ↓ 1262 lines elided ↑ open up ↑
1298 1302  
1299 1303          ASSERT(sysdc_param_init);
1300 1304          ASSERT(sysdccid >= 0);
1301 1305  
1302 1306          ASSERT((flags & ~SYSDC_THREAD_BATCH) == 0);
1303 1307  
1304 1308          sdp.sdp_minpri = sysdc_minpri;
1305 1309          sdp.sdp_maxpri = sysdc_maxpri;
1306 1310          sdp.sdp_DC = MAX(MIN(dc, sysdc_maxDC), sysdc_minDC);
1307 1311  
1308      -        VERIFY3U(CL_ALLOC(&buf, sysdccid, KM_SLEEP), ==, 0);
     1312 +        VERIFY0(CL_ALLOC(&buf, sysdccid, KM_SLEEP));
1309 1313  
1310 1314          ASSERT(t->t_lwp != NULL);
1311 1315          ASSERT(t->t_cid == syscid);
1312 1316          ASSERT(t->t_cldata == NULL);
1313      -        VERIFY3U(CL_CANEXIT(t, NULL), ==, 0);
1314      -        VERIFY3U(CL_ENTERCLASS(t, sysdccid, &sdp, kcred, buf), ==, 0);
     1317 +        VERIFY0(CL_CANEXIT(t, NULL));
     1318 +        VERIFY0(CL_ENTERCLASS(t, sysdccid, &sdp, kcred, buf));
1315 1319          CL_EXITCLASS(syscid, NULL);
1316 1320  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX