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

Side by Side Diff: runtime/vm/os.h

Issue 12041056: Initial revision of ARM simulator and (empty) MIPS simulator. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_OS_H_ 5 #ifndef VM_OS_H_
6 #define VM_OS_H_ 6 #define VM_OS_H_
7 7
8 #include "vm/globals.h" 8 #include "vm/globals.h"
9 9
10 // Forward declarations. 10 // Forward declarations.
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 // Returns the stack size limit. 72 // Returns the stack size limit.
73 static uword GetStackSizeLimit(); 73 static uword GetStackSizeLimit();
74 74
75 // Returns number of available processor cores. 75 // Returns number of available processor cores.
76 static int NumberOfAvailableProcessors(); 76 static int NumberOfAvailableProcessors();
77 77
78 // Sleep the currently executing thread for millis ms. 78 // Sleep the currently executing thread for millis ms.
79 static void Sleep(int64_t millis); 79 static void Sleep(int64_t millis);
80 80
81 // Debug break.
82 static void DebugBreak();
83
84 static uword NullPageSize() { return null_page_size_; }
Ivan Posva 2013/01/24 18:25:57 I am not sure what we need this for.
regis 2013/01/24 21:47:48 Good point. Since we do not install handlers for s
85 static bool IsInsideNullPage(intptr_t offset) {
86 return static_cast<uword>(offset) < null_page_size_;
87 }
88
81 // Print formatted output to stdout/stderr for debugging. 89 // Print formatted output to stdout/stderr for debugging.
82 static void Print(const char* format, ...) PRINTF_ATTRIBUTE(1, 2); 90 static void Print(const char* format, ...) PRINTF_ATTRIBUTE(1, 2);
83 static void PrintErr(const char* format, ...) PRINTF_ATTRIBUTE(1, 2); 91 static void PrintErr(const char* format, ...) PRINTF_ATTRIBUTE(1, 2);
84 static void VFPrint(FILE* stream, const char* format, va_list args); 92 static void VFPrint(FILE* stream, const char* format, va_list args);
85 // Print formatted output info a buffer. 93 // Print formatted output info a buffer.
86 // 94 //
87 // Does not write more than size characters (including the trailing '\0'). 95 // Does not write more than size characters (including the trailing '\0').
88 // 96 //
89 // Returns the number of characters (excluding the trailing '\0') 97 // Returns the number of characters (excluding the trailing '\0')
90 // that would been written if the buffer had been big enough. If 98 // that would been written if the buffer had been big enough. If
(...skipping 26 matching lines...) Expand all
117 125
118 // Initialize the OS class. 126 // Initialize the OS class.
119 static void InitOnce(); 127 static void InitOnce();
120 128
121 // Shut down the OS class. 129 // Shut down the OS class.
122 static void Shutdown(); 130 static void Shutdown();
123 131
124 static void Abort(); 132 static void Abort();
125 133
126 static void Exit(int code); 134 static void Exit(int code);
135
136 private:
137 // Cache the null page size.
138 static uword null_page_size_;
127 }; 139 };
128 140
129 } // namespace dart 141 } // namespace dart
130 142
131 #endif // VM_OS_H_ 143 #endif // VM_OS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698