1 /*
   2  * This file and its contents are supplied under the terms of the
   3  * Common Development and Distribution License ("CDDL"), version 1.0.
   4  * You may only use this file in accordance with the terms of version
   5  * 1.0 of the CDDL.
   6  *
   7  * A full copy of the text of the CDDL should have accompanied this
   8  * source.  A copy of the CDDL is also available via the Internet at
   9  * http://www.illumos.org/license/CDDL.
  10  */
  11 
  12 /*
  13  * Copyright (c) 2014 Joyent, Inc.  All rights reserved.
  14  */
  15 #include <sys/types.h>
  16 #include <sys/time.h>
  17 
  18 /*
  19  * Board Specific Module dependencies.
  20  */
  21 
  22 /*
  23  * While we would like to have a single consistent hrtime function across all of
  24  * the ARMv7 implementations, the chip itself leaves us rather lacking. As such,
  25  * we have to rely on each ARM board or implementation to do the work for us,
  26  * alas.
  27  */
  28 static hrtime_t
  29 dummy_hrtime(void)
  30 {
  31         return (0);
  32 }
  33 
  34 /*
  35  * Functions for a BSM to initialize
  36  */
  37 hrtime_t (*gethrtimeunscaledf)(void) = dummy_hrtime;
  38 
  39 /*
  40  * General entry points
  41  */
  42 hrtime_t
  43 gethrtime_unscaled(void)
  44 {
  45         return (gethrtimeunscaledf());
  46 }