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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 public: | 97 public: |
98 static void Lock(); | 98 static void Lock(); |
99 static void Unlock(); | 99 static void Unlock(); |
100 | 100 |
101 static void ArchiveThread(); | 101 static void ArchiveThread(); |
102 static bool RestoreThread(); | 102 static bool RestoreThread(); |
103 static void FreeThreadResources(); | 103 static void FreeThreadResources(); |
104 static bool IsArchived(); | 104 static bool IsArchived(); |
105 | 105 |
106 static void Iterate(ObjectVisitor* v); | 106 static void Iterate(ObjectVisitor* v); |
107 static void IterateThreads(ThreadVisitor* v); | 107 static void IterateArchivedThreads(ThreadVisitor* v); |
108 static void MarkCompactPrologue(bool is_compacting); | 108 static void MarkCompactPrologue(bool is_compacting); |
109 static void MarkCompactEpilogue(bool is_compacting); | 109 static void MarkCompactEpilogue(bool is_compacting); |
110 static bool IsLockedByCurrentThread() { return mutex_owner_.IsSelf(); } | 110 static bool IsLockedByCurrentThread() { return mutex_owner_.IsSelf(); } |
111 | 111 |
112 static int CurrentId(); | 112 static int CurrentId(); |
113 static void AssignId(); | 113 static void AssignId(); |
114 static bool HasId(); | 114 static bool HasId(); |
115 | 115 |
116 static void TerminateExecution(int thread_id); | 116 static void TerminateExecution(int thread_id); |
117 | 117 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 | 150 |
151 bool keep_going_; | 151 bool keep_going_; |
152 int sleep_ms_; | 152 int sleep_ms_; |
153 | 153 |
154 static ContextSwitcher* singleton_; | 154 static ContextSwitcher* singleton_; |
155 }; | 155 }; |
156 | 156 |
157 } } // namespace v8::internal | 157 } } // namespace v8::internal |
158 | 158 |
159 #endif // V8_V8THREADS_H_ | 159 #endif // V8_V8THREADS_H_ |
OLD | NEW |