Print this page
8115 parallel zfs mount

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libfakekernel/common/thread.c
          +++ new/usr/src/lib/libfakekernel/common/thread.c
↓ open down ↓ 3 lines elided ↑ open up ↑
   4    4   * You may only use this file in accordance with the terms of version
   5    5   * 1.0 of the CDDL.
   6    6   *
   7    7   * A full copy of the text of the CDDL should have accompanied this
   8    8   * source.  A copy of the CDDL is also available via the Internet at
   9    9   * http://www.illumos.org/license/CDDL.
  10   10   */
  11   11  
  12   12  /*
  13   13   * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
       14 + * Copyright 2017 RackTop Systems.
  14   15   */
  15   16  
  16   17  #include <sys/cmn_err.h>
  17   18  #include <sys/thread.h>
  18   19  #include <sys/zone.h>
       20 +#include <sys/proc.h>
  19   21  
  20   22  #define _SYNCH_H        /* keep out <synch.h> */
  21   23  #include <thread.h>
  22   24  
  23   25  /*
  24   26   * Get the current kthread_t pointer.
  25   27   */
  26   28  kthread_t *
  27   29  _curthread(void)
  28   30  {
↓ open down ↓ 86 lines elided ↑ open up ↑
 115  117          t = thread_create(stk, stksize, func, arg, len, NULL, TS_RUN, pri);
 116  118  
 117  119          return (t);
 118  120  }
 119  121  
 120  122  void
 121  123  zthread_exit(void)
 122  124  {
 123  125          thread_exit();
 124  126          /* NOTREACHED */
      127 +}
      128 +
      129 +void
      130 +tsd_create(uint_t *keyp, void (*destructor)(void *))
      131 +{
      132 +        VERIFY0(thr_keycreate(keyp, destructor));
      133 +}
      134 +
      135 +/*ARGSUSED*/
      136 +void
      137 +tsd_destroy(uint_t *keyp)
      138 +{}
      139 +
      140 +void *
      141 +tsd_get(uint_t key)
      142 +{
      143 +        void *value;
      144 +
      145 +        return (thr_getspecific(key, &value) ? NULL : value);
      146 +}
      147 +
      148 +int
      149 +tsd_set(uint_t key, void *value)
      150 +{
      151 +        return (thr_setspecific(key, value));
 125  152  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX