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

Side by Side Diff: src/platform/mutex.h

Issue 23710014: Introduce concurrent on-stack replacement. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 7 years, 3 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/optimizing-compiler-thread.cc ('k') | src/runtime.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 207
208 template <typename Mutex> 208 template <typename Mutex>
209 class LockGuard V8_FINAL { 209 class LockGuard V8_FINAL {
210 public: 210 public:
211 explicit LockGuard(Mutex* mutex) : mutex_(mutex) { mutex_->Lock(); } 211 explicit LockGuard(Mutex* mutex) : mutex_(mutex) { mutex_->Lock(); }
212 ~LockGuard() { mutex_->Unlock(); } 212 ~LockGuard() { mutex_->Unlock(); }
213 213
214 private: 214 private:
215 Mutex* mutex_; 215 Mutex* mutex_;
216 216
217 LockGuard(const LockGuard<Mutex>& other) V8_DELETE; 217 DISALLOW_COPY_AND_ASSIGN(LockGuard);
218 LockGuard<Mutex>& operator=(const LockGuard<Mutex>& other) V8_DELETE;
219 }; 218 };
220 219
221 } } // namespace v8::internal 220 } } // namespace v8::internal
222 221
223 #endif // V8_PLATFORM_MUTEX_H_ 222 #endif // V8_PLATFORM_MUTEX_H_
OLDNEW
« no previous file with comments | « src/optimizing-compiler-thread.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698