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

Side by Side Diff: base/synchronization/waitable_event.h

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « base/process/process_util_unittest.cc ('k') | base/synchronization/waitable_event_win.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef BASE_SYNCHRONIZATION_WAITABLE_EVENT_H_ 5 #ifndef BASE_SYNCHRONIZATION_WAITABLE_EVENT_H_
6 #define BASE_SYNCHRONIZATION_WAITABLE_EVENT_H_ 6 #define BASE_SYNCHRONIZATION_WAITABLE_EVENT_H_
7 7
8 #include "base/base_export.h" 8 #include "base/base_export.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // If manual_reset is true, then to set the event state to non-signaled, a 46 // If manual_reset is true, then to set the event state to non-signaled, a
47 // consumer must call the Reset method. If this parameter is false, then the 47 // consumer must call the Reset method. If this parameter is false, then the
48 // system automatically resets the event state to non-signaled after a single 48 // system automatically resets the event state to non-signaled after a single
49 // waiting thread has been released. 49 // waiting thread has been released.
50 WaitableEvent(bool manual_reset, bool initially_signaled); 50 WaitableEvent(bool manual_reset, bool initially_signaled);
51 51
52 #if defined(OS_WIN) 52 #if defined(OS_WIN)
53 // Create a WaitableEvent from an Event HANDLE which has already been 53 // Create a WaitableEvent from an Event HANDLE which has already been
54 // created. This objects takes ownership of the HANDLE and will close it when 54 // created. This objects takes ownership of the HANDLE and will close it when
55 // deleted. 55 // deleted.
56 // TODO(rvargas): Pass ScopedHandle instead (and on Release). 56 explicit WaitableEvent(win::ScopedHandle event_handle);
57 explicit WaitableEvent(HANDLE event_handle);
58
59 // Releases ownership of the handle from this object.
60 HANDLE Release();
61 #endif 57 #endif
62 58
63 ~WaitableEvent(); 59 ~WaitableEvent();
64 60
65 // Put the event in the un-signaled state. 61 // Put the event in the un-signaled state.
66 void Reset(); 62 void Reset();
67 63
68 // Put the event in the signaled state. Causing any thread blocked on Wait 64 // Put the event in the signaled state. Causing any thread blocked on Wait
69 // to be woken up. 65 // to be woken up.
70 void Signal(); 66 void Signal();
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 180
185 scoped_refptr<WaitableEventKernel> kernel_; 181 scoped_refptr<WaitableEventKernel> kernel_;
186 #endif 182 #endif
187 183
188 DISALLOW_COPY_AND_ASSIGN(WaitableEvent); 184 DISALLOW_COPY_AND_ASSIGN(WaitableEvent);
189 }; 185 };
190 186
191 } // namespace base 187 } // namespace base
192 188
193 #endif // BASE_SYNCHRONIZATION_WAITABLE_EVENT_H_ 189 #endif // BASE_SYNCHRONIZATION_WAITABLE_EVENT_H_
OLDNEW
« no previous file with comments | « base/process/process_util_unittest.cc ('k') | base/synchronization/waitable_event_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698