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

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

Issue 782693004: Update mojo sdk to rev f6c8ec07c01deebc13178d516225fd12695c3dc2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: hack mojo_system_impl gypi for android :| 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef MOJO_EDK_SYSTEM_AWAKABLE_H_
6 #define MOJO_EDK_SYSTEM_AWAKABLE_H_
7
8 #include <stdint.h>
9
10 #include "mojo/edk/system/system_impl_export.h"
11 #include "mojo/public/c/system/types.h"
12
13 namespace mojo {
14 namespace system {
15
16 // An interface that may be waited on |AwakableList|.
17 class MOJO_SYSTEM_IMPL_EXPORT Awakable {
18 public:
19 // |Awake()| must satisfy the following contract:
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
22 // "non-terminal" locks, i.e., those which are always safe to take.
23 virtual void Awake(MojoResult result, uintptr_t context) = 0;
24
25 protected:
26 Awakable() {}
27 };
28
29 } // namespace system
30 } // namespace mojo
31
32 #endif // MOJO_EDK_SYSTEM_AWAKABLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698