Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Side by Side Diff: src/v8threads.h

Issue 21087012: Simplify implementation of Mutex. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix unit test. Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/spaces.cc ('k') | src/v8threads.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 ThreadState* GetFreeThreadState(); 112 ThreadState* GetFreeThreadState();
113 113
114 private: 114 private:
115 ThreadManager(); 115 ThreadManager();
116 ~ThreadManager(); 116 ~ThreadManager();
117 117
118 void DeleteThreadStateList(ThreadState* anchor); 118 void DeleteThreadStateList(ThreadState* anchor);
119 119
120 void EagerlyArchiveThread(); 120 void EagerlyArchiveThread();
121 121
122 Mutex* mutex_; 122 Mutex mutex_;
123 ThreadId mutex_owner_; 123 ThreadId mutex_owner_;
124 ThreadId lazily_archived_thread_; 124 ThreadId lazily_archived_thread_;
125 ThreadState* lazily_archived_thread_state_; 125 ThreadState* lazily_archived_thread_state_;
126 126
127 // In the following two lists there is always at least one object on the list. 127 // In the following two lists there is always at least one object on the list.
128 // The first object is a flying anchor that is only there to simplify linking 128 // The first object is a flying anchor that is only there to simplify linking
129 // and unlinking. 129 // and unlinking.
130 // Head of linked list of free states. 130 // Head of linked list of free states.
131 ThreadState* free_anchor_; 131 ThreadState* free_anchor_;
132 // Head of linked list of states in use. 132 // Head of linked list of states in use.
(...skipping 30 matching lines...) Expand all
163 void Run(); 163 void Run();
164 164
165 bool keep_going_; 165 bool keep_going_;
166 int sleep_ms_; 166 int sleep_ms_;
167 Isolate* isolate_; 167 Isolate* isolate_;
168 }; 168 };
169 169
170 } } // namespace v8::internal 170 } } // namespace v8::internal
171 171
172 #endif // V8_V8THREADS_H_ 172 #endif // V8_V8THREADS_H_
OLDNEW
« no previous file with comments | « src/spaces.cc ('k') | src/v8threads.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698