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

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

Issue 1410053006: Move third_party/mojo/src/mojo/public to mojo/public (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 1 month 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/async_waiter.h ('k') | mojo/edk/system/awakable_list.h » ('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_AWAKABLE_H_ 5 #ifndef MOJO_EDK_SYSTEM_AWAKABLE_H_
6 #define MOJO_EDK_SYSTEM_AWAKABLE_H_ 6 #define MOJO_EDK_SYSTEM_AWAKABLE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "mojo/edk/system/system_impl_export.h" 10 #include "mojo/edk/system/system_impl_export.h"
11 #include "third_party/mojo/src/mojo/public/c/system/types.h" 11 #include "mojo/public/c/system/types.h"
12 12
13 namespace mojo { 13 namespace mojo {
14 namespace edk { 14 namespace edk {
15 15
16 // An interface that may be waited on |AwakableList|. 16 // An interface that may be waited on |AwakableList|.
17 class MOJO_SYSTEM_IMPL_EXPORT Awakable { 17 class MOJO_SYSTEM_IMPL_EXPORT Awakable {
18 public: 18 public:
19 // |Awake()| must satisfy the following contract: 19 // |Awake()| must satisfy the following contract:
20 // * As this is called from any thread, this must be thread-safe. 20 // * As this is called from any thread, this must be thread-safe.
21 // * As this is called inside a lock, this must not call anything that takes 21 // * As this is called inside a lock, this must not call anything that takes
22 // "non-terminal" locks, i.e., those which are always safe to take. 22 // "non-terminal" locks, i.e., those which are always safe to take.
23 // This should return false if this must not be called again for the same 23 // This should return false if this must not be called again for the same
24 // reason (e.g., for the same call to |AwakableList::Add()|). 24 // reason (e.g., for the same call to |AwakableList::Add()|).
25 virtual bool Awake(MojoResult result, uintptr_t context) = 0; 25 virtual bool Awake(MojoResult result, uintptr_t context) = 0;
26 26
27 protected: 27 protected:
28 Awakable() {} 28 Awakable() {}
29 }; 29 };
30 30
31 } // namespace edk 31 } // namespace edk
32 } // namespace mojo 32 } // namespace mojo
33 33
34 #endif // MOJO_EDK_SYSTEM_AWAKABLE_H_ 34 #endif // MOJO_EDK_SYSTEM_AWAKABLE_H_
OLDNEW
« no previous file with comments | « mojo/edk/system/async_waiter.h ('k') | mojo/edk/system/awakable_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698