Print this page
    
    
      
        | Split | 
	Close | 
      
      | Expand all | 
      | Collapse all | 
    
    
          --- old/usr/src/uts/common/sys/time.h
          +++ new/usr/src/uts/common/sys/time.h
   1    1  /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
   2    2  /*        All Rights Reserved   */
   3    3  
   4    4  
   5    5  /*
   6    6   * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
   7    7   * All rights reserved.  The Berkeley software License Agreement
   8    8   * specifies the terms and conditions for redistribution.
   9    9   */
  10   10  
  11   11  /*
  12   12   * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  13   13   *
  14   14   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  15   15   * Use is subject to license terms.
  16   16   *
  17   17   * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
  18   18   * Copyright 2016 Joyent, Inc.
  19   19   */
  20   20  
  21   21  /*
  22   22   * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
  23   23   */
  24   24  
  25   25  #ifndef _SYS_TIME_H
  26   26  #define _SYS_TIME_H
  27   27  
  28   28  #include <sys/feature_tests.h>
  29   29  
  30   30  /*
  31   31   * Structure returned by gettimeofday(2) system call,
  32   32   * and used in other calls.
  33   33   */
  34   34  
  35   35  #ifdef  __cplusplus
  36   36  extern "C" {
  37   37  #endif
  38   38  
  39   39  #if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || \
  40   40          defined(__EXTENSIONS__)
  41   41  #ifndef _ASM
  42   42  
  43   43  #if !defined(_TIME_T) || __cplusplus >= 199711L
  44   44  #define _TIME_T
  45   45  typedef long    time_t;         /* time of day in seconds */
  46   46  #endif  /* _TIME_T */
  47   47  
  48   48  #ifndef _SUSECONDS_T
  49   49  #define _SUSECONDS_T
  50   50  typedef long    suseconds_t;    /* signed # of microseconds */
  51   51  #endif  /* _SUSECONDS_T */
  52   52  
  53   53  struct timeval {
  54   54          time_t          tv_sec;         /* seconds */
  55   55          suseconds_t     tv_usec;        /* and microseconds */
  56   56  };
  57   57  
  58   58  #if defined(_SYSCALL32)
  59   59  
  60   60  #include <sys/types32.h>
  61   61  
  62   62  #define TIMEVAL32_TO_TIMEVAL(tv, tv32)  {       \
  63   63          (tv)->tv_sec = (time_t)(tv32)->tv_sec;  \
  64   64          (tv)->tv_usec = (tv32)->tv_usec;        \
  65   65  }
  66   66  
  67   67  #define TIMEVAL_TO_TIMEVAL32(tv32, tv)  {               \
  68   68          (tv32)->tv_sec = (time32_t)(tv)->tv_sec;        \
  69   69          (tv32)->tv_usec = (int32_t)(tv)->tv_usec;       \
  70   70  }
  71   71  
  72   72  #define TIME32_MAX      INT32_MAX
  73   73  #define TIME32_MIN      INT32_MIN
  74   74  
  75   75  #define TIMEVAL_OVERFLOW(tv)    \
  76   76          ((tv)->tv_sec < TIME32_MIN || (tv)->tv_sec > TIME32_MAX)
  77   77  
  78   78  #endif  /* _SYSCALL32 */
  79   79  
  80   80  #endif  /* _ASM */
  81   81  #endif  /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) ... */
  82   82  
  83   83  #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
  84   84  #ifndef _ASM
  85   85  struct timezone {
  86   86          int     tz_minuteswest; /* minutes west of Greenwich */
  87   87          int     tz_dsttime;     /* type of dst correction */
  88   88  };
  89   89  
  90   90  #endif  /* _ASM */
  91   91  #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
  92   92  
  93   93  #ifdef  __cplusplus
  94   94  }
  95   95  #endif
  96   96  
  97   97  /*
  98   98   * Needed for longlong_t type.  Placement of this due to <sys/types.h>
  99   99   * including <sys/select.h> which relies on the presense of the itimerval
 100  100   * structure.
 101  101   */
 102  102  #ifndef _ASM
 103  103  #include <sys/types.h>
 104  104  #endif  /* _ASM */
 105  105  
 106  106  #ifdef  __cplusplus
 107  107  extern "C" {
 108  108  #endif
 109  109  
 110  110  #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 111  111  
 112  112  #define DST_NONE        0       /* not on dst */
 113  113  #define DST_USA         1       /* USA style dst */
 114  114  #define DST_AUST        2       /* Australian style dst */
 115  115  #define DST_WET         3       /* Western European dst */
 116  116  #define DST_MET         4       /* Middle European dst */
 117  117  #define DST_EET         5       /* Eastern European dst */
 118  118  #define DST_CAN         6       /* Canada */
 119  119  #define DST_GB          7       /* Great Britain and Eire */
 120  120  #define DST_RUM         8       /* Rumania */
 121  121  #define DST_TUR         9       /* Turkey */
 122  122  #define DST_AUSTALT     10      /* Australian style with shift in 1986 */
 123  123  
 124  124  /*
 125  125   * Operations on timevals.
 126  126   */
 127  127  #define timerisset(tvp)         ((tvp)->tv_sec || (tvp)->tv_usec)
 128  128  #define timercmp(tvp, uvp, cmp) \
 129  129          (((tvp)->tv_sec == (uvp)->tv_sec) ? \
 130  130              /* CSTYLED */ \
 131  131              ((tvp)->tv_usec cmp (uvp)->tv_usec) : \
 132  132              /* CSTYLED */ \
 133  133              ((tvp)->tv_sec cmp (uvp)->tv_sec))
 134  134  
 135  135  #define timerclear(tvp)         (tvp)->tv_sec = (tvp)->tv_usec = 0
 136  136  
 137  137  #ifdef __lint
 138  138  /*
 139  139   * Make innocuous, lint-happy versions until do {} while (0) is acknowleged as
 140  140   * lint-safe.  If the compiler could know that we always make tv_usec < 1000000
 141  141   * we wouldn't need a special linted version.
 142  142   */
 143  143  #define timeradd(tvp, uvp, vvp)                                 \
 144  144          do                                                              \
 145  145          {                                                               \
 146  146                  (vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec;          \
 147  147                  (vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec;       \
 148  148                  if ((vvp)->tv_usec >= 1000000)                          \
 149  149                  {                                                       \
 150  150                          (vvp)->tv_sec++;                                \
 151  151                          (vvp)->tv_usec -= 1000000;                      \
 152  152                  }                                                       \
 153  153          } while ((vvp)->tv_usec >= 1000000)
 154  154  #define timersub(tvp, uvp, vvp)                                 \
 155  155          do                                                              \
 156  156          {                                                               \
 157  157                  (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec;          \
 158  158                  (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec;       \
 159  159                  if ((vvp)->tv_usec < 0)                                 \
 160  160                  {                                                       \
 161  161                          (vvp)->tv_sec--;                                \
 162  162                          (vvp)->tv_usec += 1000000;                      \
 163  163                  }                                                       \
 164  164          } while ((vvp)->tv_usec >= 1000000)
 165  165  #else
 166  166  #define timeradd(tvp, uvp, vvp)                                 \
 167  167          do                                                              \
 168  168          {                                                               \
 169  169                  (vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec;          \
 170  170                  (vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec;       \
 171  171                  if ((vvp)->tv_usec >= 1000000)                          \
 172  172                  {                                                       \
 173  173                          (vvp)->tv_sec++;                                \
 174  174                          (vvp)->tv_usec -= 1000000;                      \
 175  175                  }                                                       \
 176  176          } while (0)
 177  177  
 178  178  #define timersub(tvp, uvp, vvp)                                 \
 179  179          do                                                              \
 180  180          {                                                               \
 181  181                  (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec;          \
 182  182                  (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec;       \
 183  183                  if ((vvp)->tv_usec < 0)                                 \
 184  184                  {                                                       \
 185  185                          (vvp)->tv_sec--;                                \
 186  186                          (vvp)->tv_usec += 1000000;                      \
 187  187                  }                                                       \
 188  188          } while (0)
 189  189  #endif /* __lint */
 190  190  
 191  191  #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
 192  192  
 193  193  #if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
 194  194  /*
 195  195   * Names of the interval timers, and structure
 196  196   * defining a timer setting.
 197  197   */
 198  198  #define ITIMER_REAL     0       /* Decrements in real time */
 199  199  #define ITIMER_VIRTUAL  1       /* Decrements in process virtual time */
 200  200  #define ITIMER_PROF     2       /* Decrements both in process virtual */
 201  201                                  /* time and when system is running on */
 202  202                                  /* behalf of the process. */
 203  203  #define ITIMER_REALPROF 3       /* Decrements in real time for real- */
 204  204                                  /* time profiling of multithreaded */
 205  205                                  /* programs. */
 206  206  
 207  207  #ifndef _ASM
 208  208  struct  itimerval {
 209  209          struct  timeval it_interval;    /* timer interval */
 210  210          struct  timeval it_value;       /* current value */
 211  211  };
 212  212  
 213  213  #if defined(_SYSCALL32)
 214  214  
 215  215  struct itimerval32 {
 216  216          struct  timeval32 it_interval;
 217  217          struct  timeval32 it_value;
 218  218  };
 219  219  
 220  220  #define ITIMERVAL32_TO_ITIMERVAL(itv, itv32)    {       \
 221  221          TIMEVAL32_TO_TIMEVAL(&(itv)->it_interval, &(itv32)->it_interval); \
 222  222          TIMEVAL32_TO_TIMEVAL(&(itv)->it_value, &(itv32)->it_value);     \
 223  223  }
 224  224  
 225  225  #define ITIMERVAL_TO_ITIMERVAL32(itv32, itv)    {       \
 226  226          TIMEVAL_TO_TIMEVAL32(&(itv32)->it_interval, &(itv)->it_interval); \
 227  227          TIMEVAL_TO_TIMEVAL32(&(itv32)->it_value, &(itv)->it_value);     \
 228  228  }
 229  229  
 230  230  #define ITIMERVAL_OVERFLOW(itv)                         \
 231  231          (TIMEVAL_OVERFLOW(&(itv)->it_interval) ||       \
 232  232          TIMEVAL_OVERFLOW(&(itv)->it_value))
 233  233  
 234  234  #endif  /* _SYSCALL32 */
 235  235  #endif  /* _ASM */
 236  236  #endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) ... */
 237  237  
 238  238  
 239  239  #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 240  240  /*
 241  241   *      Definitions for commonly used resolutions.
 242  242   */
 243  243  #define SEC             1
 244  244  #define MILLISEC        1000
 245  245  #define MICROSEC        1000000
 246  246  #define NANOSEC         1000000000LL
 247  247  
 248  248  #define MSEC2NSEC(m)    ((hrtime_t)(m) * (NANOSEC / MILLISEC))
 249  249  #define NSEC2MSEC(n)    ((n) / (NANOSEC / MILLISEC))
 250  250  
 251  251  #define NSEC2SEC(n)     ((n) / (NANOSEC / SEC))
 252  252  #define SEC2NSEC(m)     ((hrtime_t)(m) * (NANOSEC / SEC))
 253  253  
 254  254  #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
 255  255  
 256  256  #ifndef _ASM
 257  257  
 258  258  /*
 259  259   * Time expressed as a 64-bit nanosecond counter.
 260  260   */
 261  261  typedef longlong_t      hrtime_t;
 262  262  
 263  263  #if defined(_KERNEL) || defined(_FAKE_KERNEL)
 264  264  
 265  265  /*
 266  266   * Unsigned counterpart to hrtime_t
 267  267   */
 268  268  typedef u_longlong_t    uhrtime_t;
 269  269  
 270  270  #define HRTIME_MAX      LLONG_MAX
 271  271  #define UHRTIME_MAX     ULLONG_MAX
 272  272  
 273  273  #include <sys/time_impl.h>
 274  274  #include <sys/mutex.h>
 275  275  
 276  276  extern int tick_per_msec;       /* clock ticks per millisecond (may be zero) */
 277  277  extern int msec_per_tick;       /* milliseconds per clock tick (may be zero) */
 278  278  extern int usec_per_tick;       /* microseconds per clock tick */
 279  279  extern int nsec_per_tick;       /* nanoseconds per clock tick */
 280  280  
 281  281  /*
 282  282   * Macros to convert from common units of time (sec, msec, usec, nsec,
 283  283   * timeval, timestruc) to clock ticks and vice versa.
 284  284   */
 285  285  #define TICK_TO_SEC(tick)       ((tick) / hz)
 286  286  #define SEC_TO_TICK(sec)        ((sec) * hz)
 287  287  
 288  288  #define TICK_TO_MSEC(tick)      \
 289  289          (msec_per_tick ? (tick) * msec_per_tick : (tick) / tick_per_msec)
 290  290  #define MSEC_TO_TICK(msec)      \
 291  291          (msec_per_tick ? (msec) / msec_per_tick : (msec) * tick_per_msec)
 292  292  #define MSEC_TO_TICK_ROUNDUP(msec)      \
 293  293          (msec_per_tick ? \
 294  294          ((msec) == 0 ? 0 : ((msec) - 1) / msec_per_tick + 1) : \
 295  295          (msec) * tick_per_msec)
 296  296  
 297  297  #define TICK_TO_USEC(tick)              ((tick) * usec_per_tick)
 298  298  #define USEC_TO_TICK(usec)              ((usec) / usec_per_tick)
 299  299  #define USEC_TO_TICK_ROUNDUP(usec)      \
 300  300          ((usec) == 0 ? 0 : USEC_TO_TICK((usec) - 1) + 1)
 301  301  
 302  302  #define TICK_TO_NSEC(tick)              ((hrtime_t)(tick) * nsec_per_tick)
 303  303  #define NSEC_TO_TICK(nsec)              ((nsec) / nsec_per_tick)
 304  304  #define NSEC_TO_TICK_ROUNDUP(nsec)      \
 305  305          ((nsec) == 0 ? 0 : NSEC_TO_TICK((nsec) - 1) + 1)
 306  306  
 307  307  #define TICK_TO_TIMEVAL(tick, tvp) {    \
 308  308          clock_t __tmptck = (tick);      \
 309  309          (tvp)->tv_sec = TICK_TO_SEC(__tmptck);  \
 310  310          (tvp)->tv_usec = TICK_TO_USEC(__tmptck - SEC_TO_TICK((tvp)->tv_sec)); \
 311  311  }
 312  312  
 313  313  #define TICK_TO_TIMEVAL32(tick, tvp) {  \
 314  314          clock_t __tmptck = (tick);      \
 315  315          time_t __tmptm = TICK_TO_SEC(__tmptck); \
 316  316          (tvp)->tv_sec = (time32_t)__tmptm;      \
 317  317          (tvp)->tv_usec = TICK_TO_USEC(__tmptck - SEC_TO_TICK(__tmptm)); \
 318  318  }
 319  319  
 320  320  #define TICK_TO_TIMESTRUC(tick, tsp) {  \
 321  321          clock_t __tmptck = (tick);      \
 322  322          (tsp)->tv_sec = TICK_TO_SEC(__tmptck);  \
 323  323          (tsp)->tv_nsec = TICK_TO_NSEC(__tmptck - SEC_TO_TICK((tsp)->tv_sec)); \
 324  324  }
 325  325  
 326  326  #define TICK_TO_TIMESTRUC32(tick, tsp) {        \
 327  327          clock_t __tmptck = (tick);                      \
 328  328          time_t __tmptm = TICK_TO_SEC(__tmptck);         \
 329  329          (tsp)->tv_sec = (time32_t)__tmptm;              \
 330  330          (tsp)->tv_nsec = TICK_TO_NSEC(__tmptck - SEC_TO_TICK(__tmptm)); \
 331  331  }
 332  332  
 333  333  #define TIMEVAL_TO_TICK(tvp)    \
 334  334          (SEC_TO_TICK((tvp)->tv_sec) + USEC_TO_TICK((tvp)->tv_usec))
 335  335  
 336  336  #define TIMESTRUC_TO_TICK(tsp)  \
 337  337          (SEC_TO_TICK((tsp)->tv_sec) + NSEC_TO_TICK((tsp)->tv_nsec))
 338  338  
 339  339  typedef struct todinfo {
 340  340          int     tod_sec;        /* seconds 0-59 */
 341  341          int     tod_min;        /* minutes 0-59 */
 342  342          int     tod_hour;       /* hours 0-23 */
 343  343          int     tod_dow;        /* day of week 1-7 */
 344  344          int     tod_day;        /* day of month 1-31 */
 345  345          int     tod_month;      /* month 1-12 */
 346  346          int     tod_year;       /* year 70+ */
 347  347  } todinfo_t;
 348  348  
 349  349  extern  int64_t         timedelta;
 350  350  extern  int             timechanged;
 351  351  extern  int             tod_needsync;
 352  352  extern  kmutex_t        tod_lock;
 353  353  extern  volatile timestruc_t    hrestime;
 354  354  extern  hrtime_t        hres_last_tick;
 355  355  extern  int64_t         hrestime_adj;
 356  356  extern  uint_t          adj_shift;
 357  357  
 358  358  extern  timestruc_t     tod_get(void);
 359  359  extern  void            tod_set(timestruc_t);
 360  360  extern  void            set_hrestime(timestruc_t *);
 361  361  extern  todinfo_t       utc_to_tod(time_t);
 362  362  extern  time_t          tod_to_utc(todinfo_t);
 363  363  extern  int             hr_clock_lock(void);
 364  364  extern  void            hr_clock_unlock(int);
 365  365  extern  hrtime_t        gethrtime(void);
 366  366  extern  hrtime_t        gethrtime_unscaled(void);
 367  367  extern  hrtime_t        gethrtime_max(void);
 368  368  extern  hrtime_t        gethrtime_waitfree(void);
 369  369  extern  void            scalehrtime(hrtime_t *);
 370  370  extern  uint64_t        unscalehrtime(hrtime_t);
 371  371  extern  void            gethrestime(timespec_t *);
 372  372  extern  time_t          gethrestime_sec(void);
 373  373  extern  void            gethrestime_lasttick(timespec_t *);
 374  374  extern  void            hrt2ts(hrtime_t, timestruc_t *);
 375  375  extern  hrtime_t        ts2hrt(const timestruc_t *);
 376  376  extern  void            hrt2tv(hrtime_t, struct timeval *);
 377  377  extern  hrtime_t        tv2hrt(struct timeval *);
 378  378  extern  int             itimerfix(struct timeval *, int);
 379  379  extern  int             itimerdecr(struct itimerval *, int);
 380  380  extern  void            timevaladd(struct timeval *, struct timeval *);
 381  381  extern  void            timevalsub(struct timeval *, struct timeval *);
 382  382  extern  void            timevalfix(struct timeval *);
 383  383  extern  void            dtrace_hres_tick(void);
 384  384  
 385  385  extern clock_t          ddi_get_lbolt(void);
 386  386  extern int64_t          ddi_get_lbolt64(void);
 387  387  
 388  388  #if defined(_SYSCALL32)
 389  389  extern  void            hrt2ts32(hrtime_t, timestruc32_t *);
 390  390  #endif
 391  391  
 392  392  #endif /* _KERNEL */
 393  393  
 394  394  #if !defined(_KERNEL) && !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 395  395  int adjtime(struct timeval *, struct timeval *);
 396  396  #endif /* !defined(_KERNEL) && !defined(__XOPEN_OR_POSIX) ... */
 397  397  
 398  398  #if !defined(_KERNEL) && !defined(__XOPEN_OR_POSIX) || \
 399  399          defined(_ATFILE_SOURCE) || defined(__EXTENSIONS__)
 400  400  int futimesat(int, const char *, const struct timeval *);
 401  401  #endif /* defined(__ATFILE_SOURCE) */
 402  402  
 403  403  #if !defined(_KERNEL) && !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || \
 404  404          defined(__EXTENSIONS__)
 405  405  
 406  406  int getitimer(int, struct itimerval *);
 407  407  int utimes(const char *, const struct timeval *);
 408  408  #if defined(_XPG4_2)
 409  409  int setitimer(int, const struct itimerval *_RESTRICT_KYWD,
 410  410          struct itimerval *_RESTRICT_KYWD);
 411  411  #else
 412  412  int setitimer(int, struct itimerval *_RESTRICT_KYWD,
 413  413          struct itimerval *_RESTRICT_KYWD);
 414  414  #endif /* defined(_XPG2_2) */
 415  415  
 416  416  #endif /* !defined(_KERNEL) ... defined(_XPG4_2) */
 417  417  
 418  418  /*
 419  419   * gettimeofday() and settimeofday() were included in SVr4 due to their
 420  420   * common use in BSD based applications.  They were to be included exactly
 421  421   * as in BSD, with two parameters.  However, AT&T/USL noted that the second
 422  422   * parameter was unused and deleted it, thereby making a routine included
 423  423   * for compatibility, incompatible.
 424  424   *
 425  425   * XSH4.2 (spec 1170) defines gettimeofday and settimeofday to have two
 426  426   * parameters.
 427  427   *
 428  428   * This has caused general disagreement in the application community as to
 429  429   * the syntax of these routines.  Solaris defaults to the XSH4.2 definition.
 430  430   * The flag _SVID_GETTOD may be used to force the SVID version.
 431  431   */
 432  432  #if !defined(_KERNEL) && !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 433  433  
 434  434  #if defined(_SVID_GETTOD)
 435  435  int settimeofday(struct timeval *);
 436  436  #else
 437  437  int settimeofday(struct timeval *, void *);
 438  438  #endif
 439  439  hrtime_t        gethrtime(void);
 440  440  hrtime_t        gethrvtime(void);
 441  441  
 442  442  #endif /* !(defined _KERNEL) && !defined(__XOPEN_OR_POSIX) ... */
 443  443  
 444  444  #if !defined(_KERNEL) && !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || \
 445  445          defined(__EXTENSIONS__)
 446  446  
 447  447  #if defined(_SVID_GETTOD)
 448  448  int gettimeofday(struct timeval *);
 449  449  #else
 450  450  int gettimeofday(struct timeval *_RESTRICT_KYWD, void *_RESTRICT_KYWD);
 451  451  #endif
 452  452  
 453  453  #endif /* !defined(_KERNEL) && !defined(__XOPEN_OR_POSIX) ... */
 454  454  
 455  455  /*
 456  456   * The inclusion of <time.h> is historical and was added for
 457  457   * backward compatibility in delta 1.2 when a number of definitions
 458  458   * were moved out of <sys/time.h>.  More recently, the timespec and
 459  459   * itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*,
 460  460   * _TIMER_*, and TIMER_* symbols were moved to <sys/time_impl.h>,
 461  461   * which is now included by <time.h>.  This change was due to POSIX
 462  462   * 1003.1b-1993 and X/Open UNIX 98 requirements.  For non-POSIX and
 463  463   * non-X/Open applications, including this header will still make
 464  464   * visible these definitions.
 465  465   */
 466  466  #if !defined(_BOOT) && !defined(_KERNEL) && !defined(_FAKE_KERNEL) && \
 467  467          !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 468  468  #include <time.h>
 469  469  #endif
 470  470  
 471  471  /*
 472  472   * The inclusion of <sys/select.h> is needed for the FD_CLR,
 473  473   * FD_ISSET, FD_SET, and FD_SETSIZE macros as well as the
 474  474   * select() prototype defined in the XOpen specifications
 475  475   * beginning with XSH4v2.  Placement required after definition
 476  476   * for itimerval.
 477  477   */
 478  478  #if !defined(_KERNEL) && !defined(_FAKE_KERNEL) && \
 479  479          !defined(__XOPEN_OR_POSIX) || \
 480  480          defined(_XPG4_2) || defined(__EXTENSIONS__)
 481  481  #include <sys/select.h>
 482  482  #endif
 483  483  
 484  484  #endif  /* _ASM */
 485  485  
 486  486  #ifdef  __cplusplus
 487  487  }
 488  488  #endif
 489  489  
 490  490  #endif  /* _SYS_TIME_H */
  
    | 
      ↓ open down ↓ | 
    490 lines elided | 
    
      ↑ open up ↑ | 
  
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX