Print this page
OS-5192 need faster clock_gettime
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Joshua M. Clulow <jmc@joyent.com>
Reviewed by: Ryan Zezeski <ryan@zinascii.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/intel/sys/machlock.h
          +++ new/usr/src/uts/intel/sys/machlock.h
↓ open down ↓ 13 lines elided ↑ open up ↑
  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 2007 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
       24 + * Copyright 2016 Joyent, Inc.
  24   25   */
  25   26  
  26   27  #ifndef _SYS_MACHLOCK_H
  27   28  #define _SYS_MACHLOCK_H
  28   29  
  29      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  30      -
  31   30  #ifndef _ASM
  32   31  #include <sys/types.h>
  33   32  #include <sys/time.h>
  34   33  #endif /* _ASM */
  35   34  
  36   35  #ifdef  __cplusplus
  37   36  extern "C" {
  38   37  #endif
  39   38  
  40   39  #ifndef _ASM
↓ open down ↓ 28 lines elided ↑ open up ↑
  69   68   * Macro to control loops which spin on a lock and then check state
  70   69   * periodically.  Its passed an integer, and returns a boolean value
  71   70   * that if true indicates its a good time to get the scheduler lock and
  72   71   * check the state of the current owner of the lock.
  73   72   */
  74   73  #define LOCK_SAMPLE_INTERVAL(i) (((i) & 0xff) == 0)
  75   74  
  76   75  /*
  77   76   * Externs for CLOCK_LOCK and clock resolution
  78   77   */
  79      -extern volatile int hres_lock;
       78 +extern volatile uint32_t hres_lock;
  80   79  extern hrtime_t hrtime_base;
  81   80  extern int clock_res;
  82   81  
  83   82  #endif  /* _ASM */
  84   83  
  85   84  /*
  86   85   * The definitions of the symbolic interrupt levels:
  87   86   *
  88   87   *   CLOCK_LEVEL =>  The level at which one must be to block the clock.
  89   88   *
↓ open down ↓ 52 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX