OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 // OS | 166 // OS |
167 // | 167 // |
168 // This class has static methods for the different platform specific | 168 // This class has static methods for the different platform specific |
169 // functions. Add methods here to cope with differences between the | 169 // functions. Add methods here to cope with differences between the |
170 // supported platforms. | 170 // supported platforms. |
171 | 171 |
172 class OS { | 172 class OS { |
173 public: | 173 public: |
174 // Initializes the platform OS support that depend on CPU features. This is | 174 // Initializes the platform OS support that depend on CPU features. This is |
175 // called after CPU initialization. | 175 // called after CPU initialization. |
176 static void PostSetUp(); | 176 static void PostSetUp(bool serializer_enabled); |
177 | 177 |
178 // Returns the accumulated user time for thread. This routine | 178 // Returns the accumulated user time for thread. This routine |
179 // can be used for profiling. The implementation should | 179 // can be used for profiling. The implementation should |
180 // strive for high-precision timer resolution, preferable | 180 // strive for high-precision timer resolution, preferable |
181 // micro-second resolution. | 181 // micro-second resolution. |
182 static int GetUserTime(uint32_t* secs, uint32_t* usecs); | 182 static int GetUserTime(uint32_t* secs, uint32_t* usecs); |
183 | 183 |
184 // Returns current time as the number of milliseconds since | 184 // Returns current time as the number of milliseconds since |
185 // 00:00:00 UTC, January 1, 1970. | 185 // 00:00:00 UTC, January 1, 1970. |
186 static double TimeCurrentMillis(); | 186 static double TimeCurrentMillis(); |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
617 char name_[kMaxThreadNameLength]; | 617 char name_[kMaxThreadNameLength]; |
618 int stack_size_; | 618 int stack_size_; |
619 Semaphore* start_semaphore_; | 619 Semaphore* start_semaphore_; |
620 | 620 |
621 DISALLOW_COPY_AND_ASSIGN(Thread); | 621 DISALLOW_COPY_AND_ASSIGN(Thread); |
622 }; | 622 }; |
623 | 623 |
624 } } // namespace v8::internal | 624 } } // namespace v8::internal |
625 | 625 |
626 #endif // V8_PLATFORM_H_ | 626 #endif // V8_PLATFORM_H_ |
OLD | NEW |