Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Side by Side Diff: tools/ThermalManager.cpp

Issue 1688823002: Fix for mips build (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "ThermalManager.h" 8 #include "ThermalManager.h"
9 9
10 #include "SkOSFile.h" 10 #include "SkOSFile.h"
11 11
12 #include <stdio.h> 12 #include <stdio.h>
13 13
14 #ifndef SK_BUILD_FOR_WIN32
15 #include <unistd.h>
16 #endif
17
14 #ifdef THERMAL_MANAGER_SUPPORTED 18 #ifdef THERMAL_MANAGER_SUPPORTED
15 19
16 /* 20 /*
17 * ThermalManager is completely dependent on sysfs to monitor thermal temperatur es. In sysfs 21 * ThermalManager is completely dependent on sysfs to monitor thermal temperatur es. In sysfs
18 * thermal management is controlled by a number of thermal zones. They are laid out as follows: 22 * thermal management is controlled by a number of thermal zones. They are laid out as follows:
19 * /sys/class/thermal/thermal_zoneN where N is the number of the thermal zone st arting at 0. 23 * /sys/class/thermal/thermal_zoneN where N is the number of the thermal zone st arting at 0.
20 * 24 *
21 * Inside each thermal_zone folder is a file called 'temp,' which has the curren t temperature 25 * Inside each thermal_zone folder is a file called 'temp,' which has the curren t temperature
22 * reading from the sensor in that zone, as well as 0 or more files called 'trip _point_N_temp.' 26 * reading from the sensor in that zone, as well as 0 or more files called 'trip _point_N_temp.'
23 * 27 *
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 bool wouldTrip = !fDisabled && currentTemp + fThreshold >= fPoint; 108 bool wouldTrip = !fDisabled && currentTemp + fThreshold >= fPoint;
105 109
106 if (wouldTrip) { 110 if (wouldTrip) {
107 SkDebugf("%s/%s would trip {%d,%d,%d,%d}\n", fThermalZoneRoot.c_str(), 111 SkDebugf("%s/%s would trip {%d,%d,%d,%d}\n", fThermalZoneRoot.c_str(),
108 fPointName.c_str(), fBase, currentTemp, fPoint, fThreshold); 112 fPointName.c_str(), fBase, currentTemp, fPoint, fThreshold);
109 } 113 }
110 return wouldTrip; 114 return wouldTrip;
111 } 115 }
112 116
113 #endif 117 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698