Chromium Code Reviews| OLD | NEW |
|---|---|
| (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/public/c/system/types.h" | |
| 11 | |
| 12 namespace mojo { | |
| 13 namespace system { | |
| 14 | |
| 15 // Awakable is a callback that is called by AwakableList. | |
|
viettrungluu
2014/12/03 21:18:13
nit: For consistency with the rest of the director
Hajime Morrita
2014/12/03 21:44:09
Done.
| |
| 16 // The Awake() callback must satisfy following contract: | |
|
viettrungluu
2014/12/03 21:18:13
Put this comment above |Awake()|. You can rewrite
Hajime Morrita
2014/12/03 21:44:09
Done.
| |
| 17 // | |
| 18 // * As it is called from any thread, the callback must be thread-safe. | |
|
viettrungluu
2014/12/03 21:18:13
"it" -> "this", "the callback" -> "this"
Hajime Morrita
2014/12/03 21:44:09
Done.
| |
| 19 // * As it is called inside a lock, the callback must not call API that | |
|
viettrungluu
2014/12/03 21:18:13
"it" -> "this", "the callback" -> "this"
More sig
Hajime Morrita
2014/12/03 21:44:09
That is right. "any lock" is unnecessarily restric
| |
| 20 // does lock any Mojo-related objects. | |
| 21 class Awakable { | |
| 22 public: | |
| 23 virtual void Awake(MojoResult result, uintptr_t context) = 0; | |
| 24 }; | |
| 25 | |
| 26 } // namespace system | |
| 27 } // namespace mojo | |
| 28 | |
| 29 #endif // MOJO_EDK_SYSTEM_AWAKABLE_H_ | |
| OLD | NEW |