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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 ThreadId id() { return id_; } | 47 ThreadId id() { return id_; } |
48 | 48 |
49 // Should the thread be terminated when it is restored? | 49 // Should the thread be terminated when it is restored? |
50 bool terminate_on_restore() { return terminate_on_restore_; } | 50 bool terminate_on_restore() { return terminate_on_restore_; } |
51 void set_terminate_on_restore(bool terminate_on_restore) { | 51 void set_terminate_on_restore(bool terminate_on_restore) { |
52 terminate_on_restore_ = terminate_on_restore; | 52 terminate_on_restore_ = terminate_on_restore; |
53 } | 53 } |
54 | 54 |
55 // Get data area for archiving a thread. | 55 // Get data area for archiving a thread. |
56 char* data() { return data_; } | 56 char* data() { return data_; } |
| 57 |
57 private: | 58 private: |
58 explicit ThreadState(ThreadManager* thread_manager); | 59 explicit ThreadState(ThreadManager* thread_manager); |
59 | 60 |
60 void AllocateSpace(); | 61 void AllocateSpace(); |
61 | 62 |
62 ThreadId id_; | 63 ThreadId id_; |
63 bool terminate_on_restore_; | 64 bool terminate_on_restore_; |
64 char* data_; | 65 char* data_; |
65 ThreadState* next_; | 66 ThreadState* next_; |
66 ThreadState* previous_; | 67 ThreadState* previous_; |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 void Run(); | 160 void Run(); |
160 | 161 |
161 bool keep_going_; | 162 bool keep_going_; |
162 int sleep_ms_; | 163 int sleep_ms_; |
163 Isolate* isolate_; | 164 Isolate* isolate_; |
164 }; | 165 }; |
165 | 166 |
166 } } // namespace v8::internal | 167 } } // namespace v8::internal |
167 | 168 |
168 #endif // V8_V8THREADS_H_ | 169 #endif // V8_V8THREADS_H_ |
OLD | NEW |