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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 IterateArchivedThreads(ThreadVisitor* v); | 107 static void IterateArchivedThreads(ThreadVisitor* v); |
108 static void MarkCompactPrologue(bool is_compacting); | |
109 static void MarkCompactEpilogue(bool is_compacting); | |
110 static bool IsLockedByCurrentThread() { return mutex_owner_.IsSelf(); } | 108 static bool IsLockedByCurrentThread() { return mutex_owner_.IsSelf(); } |
111 | 109 |
112 static int CurrentId(); | 110 static int CurrentId(); |
113 static void AssignId(); | 111 static void AssignId(); |
114 static bool HasId(); | 112 static bool HasId(); |
115 | 113 |
116 static void TerminateExecution(int thread_id); | 114 static void TerminateExecution(int thread_id); |
117 | 115 |
118 static const int kInvalidId = -1; | 116 static const int kInvalidId = -1; |
119 private: | 117 private: |
(...skipping 30 matching lines...) Expand all Loading... |
150 | 148 |
151 bool keep_going_; | 149 bool keep_going_; |
152 int sleep_ms_; | 150 int sleep_ms_; |
153 | 151 |
154 static ContextSwitcher* singleton_; | 152 static ContextSwitcher* singleton_; |
155 }; | 153 }; |
156 | 154 |
157 } } // namespace v8::internal | 155 } } // namespace v8::internal |
158 | 156 |
159 #endif // V8_V8THREADS_H_ | 157 #endif // V8_V8THREADS_H_ |
OLD | NEW |