| OLD | NEW |
| 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 26 matching lines...) Expand all Loading... |
| 37 static int64_t GetCurrentTimeMillis(); | 37 static int64_t GetCurrentTimeMillis(); |
| 38 | 38 |
| 39 // Returns the current time in microseconds measured | 39 // Returns the current time in microseconds measured |
| 40 // from midnight January 1, 1970 UTC. | 40 // from midnight January 1, 1970 UTC. |
| 41 static int64_t GetCurrentTimeMicros(); | 41 static int64_t GetCurrentTimeMicros(); |
| 42 | 42 |
| 43 // Returns the activation frame alignment constraint or zero if | 43 // Returns the activation frame alignment constraint or zero if |
| 44 // the platform doesn't care. Guaranteed to be a power of two. | 44 // the platform doesn't care. Guaranteed to be a power of two. |
| 45 static word ActivationFrameAlignment(); | 45 static word ActivationFrameAlignment(); |
| 46 | 46 |
| 47 // This constant is guaranteed to be greater or equal to the |
| 48 // preferred code alignment on all platforms. |
| 49 static const int kMaxPreferredCodeAlignment = 32; |
| 50 |
| 47 // Returns the preferred code alignment or zero if | 51 // Returns the preferred code alignment or zero if |
| 48 // the platform doesn't care. Guaranteed to be a power of two. | 52 // the platform doesn't care. Guaranteed to be a power of two. |
| 49 static word PreferredCodeAlignment(); | 53 static word PreferredCodeAlignment(); |
| 50 | 54 |
| 51 // Returns the stack size limit. | 55 // Returns the stack size limit. |
| 52 static uword GetStackSizeLimit(); | 56 static uword GetStackSizeLimit(); |
| 53 | 57 |
| 54 // Returns number of available processor cores. | 58 // Returns number of available processor cores. |
| 55 static int NumberOfAvailableProcessors(); | 59 static int NumberOfAvailableProcessors(); |
| 56 | 60 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 static void Shutdown(); | 101 static void Shutdown(); |
| 98 | 102 |
| 99 static void Abort(); | 103 static void Abort(); |
| 100 | 104 |
| 101 static void Exit(int code); | 105 static void Exit(int code); |
| 102 }; | 106 }; |
| 103 | 107 |
| 104 } // namespace dart | 108 } // namespace dart |
| 105 | 109 |
| 106 #endif // VM_OS_H_ | 110 #endif // VM_OS_H_ |
| OLD | NEW |