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

Side by Side Diff: mojo/edk/system/waiter.h

Issue 799113004: Update mojo sdk to rev 59145288bae55b0fce4276b017df6a1117bcf00f (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add mojo's ply to checklicenses whitelist 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 | « mojo/edk/system/remote_message_pipe_unittest.cc ('k') | mojo/edk/system/waiter.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 Chromium Authors. All rights reserved. 1 // Copyright 2013 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 MOJO_EDK_SYSTEM_WAITER_H_ 5 #ifndef MOJO_EDK_SYSTEM_WAITER_H_
6 #define MOJO_EDK_SYSTEM_WAITER_H_ 6 #define MOJO_EDK_SYSTEM_WAITER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // |MojoWait()|/|MojoWaitMany()| was called) was closed (hence the 51 // |MojoWait()|/|MojoWaitMany()| was called) was closed (hence the
52 // dispatcher closed); and 52 // dispatcher closed); and
53 // - |MOJO_RESULT_FAILED_PRECONDITION| if one of the set of flags passed to 53 // - |MOJO_RESULT_FAILED_PRECONDITION| if one of the set of flags passed to
54 // |MojoWait()|/|MojoWaitMany()| cannot or can no longer be satisfied by 54 // |MojoWait()|/|MojoWaitMany()| cannot or can no longer be satisfied by
55 // the corresponding handle (e.g., if the other end of a message or data 55 // the corresponding handle (e.g., if the other end of a message or data
56 // pipe is closed). 56 // pipe is closed).
57 MojoResult Wait(MojoDeadline deadline, uint32_t* context); 57 MojoResult Wait(MojoDeadline deadline, uint32_t* context);
58 58
59 // Wake the waiter up with the given result and context (or no-op if it's been 59 // Wake the waiter up with the given result and context (or no-op if it's been
60 // woken up already). 60 // woken up already).
61 void Awake(MojoResult result, uintptr_t context) override; 61 bool Awake(MojoResult result, uintptr_t context) override;
62 62
63 private: 63 private:
64 base::ConditionVariable cv_; // Associated to |lock_|. 64 base::ConditionVariable cv_; // Associated to |lock_|.
65 base::Lock lock_; // Protects the following members. 65 base::Lock lock_; // Protects the following members.
66 #ifndef NDEBUG 66 #ifndef NDEBUG
67 bool initialized_; 67 bool initialized_;
68 #endif 68 #endif
69 bool awoken_; 69 bool awoken_;
70 MojoResult awake_result_; 70 MojoResult awake_result_;
71 uintptr_t awake_context_; 71 uintptr_t awake_context_;
72 72
73 DISALLOW_COPY_AND_ASSIGN(Waiter); 73 DISALLOW_COPY_AND_ASSIGN(Waiter);
74 }; 74 };
75 75
76 } // namespace system 76 } // namespace system
77 } // namespace mojo 77 } // namespace mojo
78 78
79 #endif // MOJO_EDK_SYSTEM_WAITER_H_ 79 #endif // MOJO_EDK_SYSTEM_WAITER_H_
OLDNEW
« no previous file with comments | « mojo/edk/system/remote_message_pipe_unittest.cc ('k') | mojo/edk/system/waiter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698