• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright 2014 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6 
7 // system_utils.h: declaration of OS-specific utility functions
8 
9 #ifndef UTIL_SYSTEM_UTILS_H_
10 #define UTIL_SYSTEM_UTILS_H_
11 
12 #include <string>
13 
14 #include "common/system_utils.h"
15 #include "util/util_export.h"
16 
17 namespace angle
18 {
19 // Cross platform equivalent of the Windows Sleep function
20 ANGLE_UTIL_EXPORT void Sleep(unsigned int milliseconds);
21 
22 ANGLE_UTIL_EXPORT void SetLowPriorityProcess();
23 
24 // Write a debug message, either to a standard output or Debug window.
25 ANGLE_UTIL_EXPORT void WriteDebugMessage(const char *format, ...);
26 
27 // Set thread affinity and priority.
28 ANGLE_UTIL_EXPORT bool StabilizeCPUForBenchmarking();
29 
30 // Set a crash handler to print stack traces.
31 ANGLE_UTIL_EXPORT void InitCrashHandler();
32 ANGLE_UTIL_EXPORT void TerminateCrashHandler();
33 
34 // Print a stack back trace.
35 ANGLE_UTIL_EXPORT void PrintStackBacktrace();
36 }  // namespace angle
37 
38 #endif  // UTIL_SYSTEM_UTILS_H_
39