Print this page
2619 asynchronous destruction of ZFS file systems
2747 SPA versioning with zfs feature flags
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <gwilson@delphix.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Reviewed by: Dan Kruchinin <dan.kruchinin@gmail.com>
Approved by: Dan McDonald <danmcd@nexenta.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libc/port/threads/assfail.c
          +++ new/usr/src/lib/libc/port/threads/assfail.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  /*
  23   23   * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
       26 +/*
       27 + * Copyright (c) 2012 by Delphix. All rights reserved.
       28 + */
  26   29  
  27   30  #include "lint.h"
  28   31  #include "thr_uberdata.h"
  29   32  
  30   33  const char *panicstr;
  31   34  ulwp_t *panic_thread;
  32   35  
  33   36  static mutex_t assert_lock = DEFAULTMUTEX;
  34   37  static ulwp_t *assert_thread = NULL;
  35   38  
↓ open down ↓ 398 lines elided ↑ open up ↑
 434  437   * used to define and export it, needlessly.  Now that libaio is folded
 435  438   * into libc, we need to continue this for ABI/version reasons.
 436  439   * We don't use "#pragma weak assfail __assfail" in order to avoid
 437  440   * warnings from the check_fnames utility at build time for libraries
 438  441   * that define their own version of assfail().
 439  442   */
 440  443  void
 441  444  assfail(const char *assertion, const char *filename, int line_num)
 442  445  {
 443  446          __assfail(assertion, filename, line_num);
      447 +}
      448 +
      449 +void
      450 +assfail3(const char *assertion, uintmax_t lv, const char *op, uintmax_t rv,
      451 +    const char *filename, int line_num)
      452 +{
      453 +        char buf[1000];
      454 +        (void) strcpy(buf, assertion);
      455 +        (void) strcat(buf, " (0x");
      456 +        ultos((uint64_t)lv, 16, buf + strlen(buf));
      457 +        (void) strcat(buf, " ");
      458 +        (void) strcat(buf, op);
      459 +        (void) strcat(buf, " 0x");
      460 +        ultos((uint64_t)rv, 16, buf + strlen(buf));
      461 +        (void) strcat(buf, ")");
      462 +        __assfail(buf, filename, line_num);
 444  463  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX