Print this page
OS-2366 ddi_periodic_add(9F) is entirely rubbish (MORE)

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/os/clock.c
          +++ new/usr/src/uts/common/os/clock.c
↓ open down ↓ 56 lines elided ↑ open up ↑
  57   57  #include <sys/mem_cage.h>
  58   58  
  59   59  #include <vm/page.h>
  60   60  #include <vm/anon.h>
  61   61  #include <vm/rm.h>
  62   62  #include <sys/cyclic.h>
  63   63  #include <sys/cpupart.h>
  64   64  #include <sys/rctl.h>
  65   65  #include <sys/task.h>
  66   66  #include <sys/sdt.h>
  67      -#include <sys/ddi_timer.h>
       67 +#include <sys/ddi_periodic.h>
  68   68  #include <sys/random.h>
  69   69  #include <sys/modctl.h>
  70   70  #include <sys/zone.h>
  71   71  
  72   72  /*
  73   73   * for NTP support
  74   74   */
  75   75  #include <sys/timex.h>
  76   76  #include <sys/inttypes.h>
  77   77  
↓ open down ↓ 231 lines elided ↑ open up ↑
 309  309  
 310  310  
 311  311  int one_sec = 1; /* turned on once every second */
 312  312  static int fsflushcnt;  /* counter for t_fsflushr */
 313  313  int     dosynctodr = 1; /* patchable; enable/disable sync to TOD chip */
 314  314  int     tod_needsync = 0;       /* need to sync tod chip with software time */
 315  315  static int tod_broken = 0;      /* clock chip doesn't work */
 316  316  time_t  boot_time = 0;          /* Boot time in seconds since 1970 */
 317  317  cyclic_id_t clock_cyclic;       /* clock()'s cyclic_id */
 318  318  cyclic_id_t deadman_cyclic;     /* deadman()'s cyclic_id */
 319      -cyclic_id_t ddi_timer_cyclic;   /* cyclic_timer()'s cyclic_id */
 320  319  
 321  320  extern void     clock_tick_schedule(int);
 322  321  
 323  322  static int lgrp_ticks;          /* counter to schedule lgrp load calcs */
 324  323  
 325  324  /*
 326  325   * for tod fault detection
 327  326   */
 328  327  #define TOD_REF_FREQ            ((longlong_t)(NANOSEC))
 329  328  #define TOD_STALL_THRESHOLD     (TOD_REF_FREQ * 3 / 2)
↓ open down ↓ 2337 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX