| OLD | NEW |
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 }; | 79 }; |
| 80 | 80 |
| 81 | 81 |
| 82 class ThreadManager : public AllStatic { | 82 class ThreadManager : public AllStatic { |
| 83 public: | 83 public: |
| 84 static void Lock(); | 84 static void Lock(); |
| 85 static void Unlock(); | 85 static void Unlock(); |
| 86 | 86 |
| 87 static void ArchiveThread(); | 87 static void ArchiveThread(); |
| 88 static bool RestoreThread(); | 88 static bool RestoreThread(); |
| 89 static void FreeThreadResources(); |
| 89 static bool IsArchived(); | 90 static bool IsArchived(); |
| 90 | 91 |
| 91 static void Iterate(ObjectVisitor* v); | 92 static void Iterate(ObjectVisitor* v); |
| 92 static void MarkCompactPrologue(bool is_compacting); | 93 static void MarkCompactPrologue(bool is_compacting); |
| 93 static void MarkCompactEpilogue(bool is_compacting); | 94 static void MarkCompactEpilogue(bool is_compacting); |
| 94 static bool IsLockedByCurrentThread() { return mutex_owner_.IsSelf(); } | 95 static bool IsLockedByCurrentThread() { return mutex_owner_.IsSelf(); } |
| 95 | 96 |
| 96 static int CurrentId(); | 97 static int CurrentId(); |
| 97 static void AssignId(); | 98 static void AssignId(); |
| 98 static bool HasId(); | 99 static bool HasId(); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 | 135 |
| 135 bool keep_going_; | 136 bool keep_going_; |
| 136 int sleep_ms_; | 137 int sleep_ms_; |
| 137 | 138 |
| 138 static ContextSwitcher* singleton_; | 139 static ContextSwitcher* singleton_; |
| 139 }; | 140 }; |
| 140 | 141 |
| 141 } } // namespace v8::internal | 142 } } // namespace v8::internal |
| 142 | 143 |
| 143 #endif // V8_V8THREADS_H_ | 144 #endif // V8_V8THREADS_H_ |
| OLD | NEW |