Print this page
NEX-2787 Multiple comstar / fibre channel / qlt threads stuck waiting on locks with a spinning interrupt thread
Reviewed by: Rob Gittins <rob.gittins@nexenta.com>
Approved by: Jean McCormack <jean.mccormack@nexenta.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/mdb/common/kmdb/kmdb_stubs.c
          +++ new/usr/src/cmd/mdb/common/kmdb/kmdb_stubs.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 2006 Sun Microsystems, Inc.  All rights reserved.
       23 + * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
  23   24   * Use is subject to license terms.
  24   25   */
  25   26  
  26   27  /*
  27   28   * Stubs for basic system services otherwise unavailable to the debugger.
  28   29   */
  29   30  
  30   31  #include <stdlib.h>
  31   32  #include <unistd.h>
  32   33  #include <libproc.h>
↓ open down ↓ 24 lines elided ↑ open up ↑
  57   58  
  58   59          return (errnostr);
  59   60  }
  60   61  
  61   62  pid_t
  62   63  getpid(void)
  63   64  {
  64   65          return (1);
  65   66  }
  66   67  
       68 +void
       69 +__assert(const char *statement, const char *file, int line)
       70 +{
       71 +        (void) mdb_printf("ASSERT at %s, File: %s, Line: %d\n",
       72 +            statement ? statement : "<empty>",
       73 +            file ? file : "<empty>", line);
       74 +        exit(1);
       75 +}
       76 +
  67   77  /*
  68   78   * We're trying to isolate ourselves from the rest of the world as much as
  69   79   * possible, so we can't rely on the time in the kernel proper.  For now, we
  70   80   * just bump a counter whenever time is requested, thus guaranteeing that
  71   81   * things with timestamps can be compared according to order of occurrance.
  72   82   */
  73   83  hrtime_t
  74   84  gethrtime(void)
  75   85  {
  76   86          static hrtime_t kmdb_timestamp;
↓ open down ↓ 102 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX