Print this page
PANKOVs restructure


  21 
  22 /*
  23  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 
  27 /*
  28  * Solaris x86 ACPI ThermalZone Monitor
  29  */
  30 
  31 
  32 #include <sys/errno.h>
  33 #include <sys/conf.h>
  34 #include <sys/modctl.h>
  35 #include <sys/open.h>
  36 #include <sys/stat.h>
  37 #include <sys/ddi.h>
  38 #include <sys/sunddi.h>
  39 #include <sys/ksynch.h>
  40 #include <sys/uadmin.h>
  41 #include <sys/acpi/acpi.h>
  42 #include <sys/acpica.h>
  43 #include <sys/sdt.h>
  44 
  45 #include "tzmon.h"
  46 
  47 
  48 #define TZMON_ENUM_TRIP_POINTS  1
  49 #define TZMON_ENUM_DEV_LISTS    2
  50 #define TZMON_ENUM_ALL          (TZMON_ENUM_TRIP_POINTS | TZMON_ENUM_DEV_LISTS)
  51 
  52 /*
  53  * TZ_TASKQ_NAME_LEN is precisely the length of the string "AcpiThermalMonitor"
  54  * plus a two-digit instance number plus a NULL.  If the taskq name is changed
  55  * (particularly if it is lengthened), then this value needs to change.
  56  */
  57 #define TZ_TASKQ_NAME_LEN       21
  58 
  59 /*
  60  * Kelvin to Celsius conversion
  61  * The formula for converting degrees Kelvin to degrees Celsius is




  21 
  22 /*
  23  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 
  27 /*
  28  * Solaris x86 ACPI ThermalZone Monitor
  29  */
  30 
  31 
  32 #include <sys/errno.h>
  33 #include <sys/conf.h>
  34 #include <sys/modctl.h>
  35 #include <sys/open.h>
  36 #include <sys/stat.h>
  37 #include <sys/ddi.h>
  38 #include <sys/sunddi.h>
  39 #include <sys/ksynch.h>
  40 #include <sys/uadmin.h>
  41 #include <acpica/include/acpi.h>
  42 #include <sys/acpica.h>
  43 #include <sys/sdt.h>
  44 
  45 #include "tzmon.h"
  46 
  47 
  48 #define TZMON_ENUM_TRIP_POINTS  1
  49 #define TZMON_ENUM_DEV_LISTS    2
  50 #define TZMON_ENUM_ALL          (TZMON_ENUM_TRIP_POINTS | TZMON_ENUM_DEV_LISTS)
  51 
  52 /*
  53  * TZ_TASKQ_NAME_LEN is precisely the length of the string "AcpiThermalMonitor"
  54  * plus a two-digit instance number plus a NULL.  If the taskq name is changed
  55  * (particularly if it is lengthened), then this value needs to change.
  56  */
  57 #define TZ_TASKQ_NAME_LEN       21
  58 
  59 /*
  60  * Kelvin to Celsius conversion
  61  * The formula for converting degrees Kelvin to degrees Celsius is