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

Side by Side Diff: base/synchronization/cancellation_flag.cc

Issue 6410105: run iwyu on base! Base URL: svn://svn.chromium.org/chrome/trunk/src/base
Patch Set: Created 9 years, 10 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 | « base/sync_socket_posix.cc ('k') | base/synchronization/condition_variable_posix.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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdbool.h>
6
7 #include "base/atomicops_internals_x86_macosx.h"
8 #include "base/logging.h"
5 #include "base/synchronization/cancellation_flag.h" 9 #include "base/synchronization/cancellation_flag.h"
6 10 #include "base/threading/platform_thread.h"
7 #include "base/logging.h"
8 11
9 namespace base { 12 namespace base {
10 13
11 void CancellationFlag::Set() { 14 void CancellationFlag::Set() {
12 #if !defined(NDEBUG) 15 #if !defined(NDEBUG)
13 DCHECK_EQ(set_on_, PlatformThread::CurrentId()); 16 DCHECK_EQ(set_on_, PlatformThread::CurrentId());
14 #endif 17 #endif
15 base::subtle::Release_Store(&flag_, 1); 18 base::subtle::Release_Store(&flag_, 1);
16 } 19 }
17 20
18 bool CancellationFlag::IsSet() const { 21 bool CancellationFlag::IsSet() const {
19 return base::subtle::Acquire_Load(&flag_) != 0; 22 return base::subtle::Acquire_Load(&flag_) != 0;
20 } 23 }
21 24
22 } // namespace base 25 } // namespace base
OLDNEW
« no previous file with comments | « base/sync_socket_posix.cc ('k') | base/synchronization/condition_variable_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698