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

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

Issue 1783623005: Add mojo/c/system/{time.h,wait.h}. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 9 months 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
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_CORE_H_ 5 #ifndef MOJO_EDK_SYSTEM_CORE_H_
6 #define MOJO_EDK_SYSTEM_CORE_H_ 6 #define MOJO_EDK_SYSTEM_CORE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <functional> 10 #include <functional>
11 11
12 #include "mojo/edk/system/handle_table.h" 12 #include "mojo/edk/system/handle_table.h"
13 #include "mojo/edk/system/mapping_table.h" 13 #include "mojo/edk/system/mapping_table.h"
14 #include "mojo/edk/system/memory.h" 14 #include "mojo/edk/system/memory.h"
15 #include "mojo/edk/util/mutex.h" 15 #include "mojo/edk/util/mutex.h"
16 #include "mojo/edk/util/ref_ptr.h" 16 #include "mojo/edk/util/ref_ptr.h"
17 #include "mojo/edk/util/thread_annotations.h" 17 #include "mojo/edk/util/thread_annotations.h"
18 #include "mojo/public/c/system/buffer.h" 18 #include "mojo/public/c/system/buffer.h"
19 #include "mojo/public/c/system/data_pipe.h" 19 #include "mojo/public/c/system/data_pipe.h"
20 #include "mojo/public/c/system/handle.h" 20 #include "mojo/public/c/system/handle.h"
21 #include "mojo/public/c/system/message_pipe.h" 21 #include "mojo/public/c/system/message_pipe.h"
22 #include "mojo/public/c/system/result.h" 22 #include "mojo/public/c/system/result.h"
23 #include "mojo/public/c/system/types.h" 23 #include "mojo/public/c/system/time.h"
24 #include "mojo/public/cpp/system/macros.h" 24 #include "mojo/public/cpp/system/macros.h"
25 25
26 namespace mojo { 26 namespace mojo {
27 27
28 namespace embedder { 28 namespace embedder {
29 class PlatformSupport; 29 class PlatformSupport;
30 } 30 }
31 31
32 namespace system { 32 namespace system {
33 33
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 } 76 }
77 77
78 // --------------------------------------------------------------------------- 78 // ---------------------------------------------------------------------------
79 79
80 // The following methods are essentially implementations of the Mojo Core 80 // The following methods are essentially implementations of the Mojo Core
81 // functions of the Mojo API, with the C interface translated to C++ by 81 // functions of the Mojo API, with the C interface translated to C++ by
82 // "mojo/edk/embedder/entrypoints.cc". The best way to understand the contract 82 // "mojo/edk/embedder/entrypoints.cc". The best way to understand the contract
83 // of these methods is to look at the header files defining the corresponding 83 // of these methods is to look at the header files defining the corresponding
84 // API functions, referenced below. 84 // API functions, referenced below.
85 85
86 // This method corresponds to the API function defined in
87 // "mojo/public/c/system/time.h":
88
89 MojoTimeTicks GetTimeTicksNow();
90
91 // This method corresponds to the API function defined in
92 // "mojo/public/c/system/handle.h":
93 MojoResult Close(MojoHandle handle);
94
86 // These methods correspond to the API functions defined in 95 // These methods correspond to the API functions defined in
87 // "mojo/public/c/system/functions.h": 96 // "mojo/public/c/system/wait.h":
88 MojoTimeTicks GetTimeTicksNow();
89 MojoResult Close(MojoHandle handle);
90 MojoResult Wait(MojoHandle handle, 97 MojoResult Wait(MojoHandle handle,
91 MojoHandleSignals signals, 98 MojoHandleSignals signals,
92 MojoDeadline deadline, 99 MojoDeadline deadline,
93 UserPointer<MojoHandleSignalsState> signals_state); 100 UserPointer<MojoHandleSignalsState> signals_state);
94 MojoResult WaitMany(UserPointer<const MojoHandle> handles, 101 MojoResult WaitMany(UserPointer<const MojoHandle> handles,
95 UserPointer<const MojoHandleSignals> signals, 102 UserPointer<const MojoHandleSignals> signals,
96 uint32_t num_handles, 103 uint32_t num_handles,
97 MojoDeadline deadline, 104 MojoDeadline deadline,
98 UserPointer<uint32_t> result_index, 105 UserPointer<uint32_t> result_index,
99 UserPointer<MojoHandleSignalsState> signals_states); 106 UserPointer<MojoHandleSignalsState> signals_states);
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 util::Mutex mapping_table_mutex_; 195 util::Mutex mapping_table_mutex_;
189 MappingTable mapping_table_ MOJO_GUARDED_BY(mapping_table_mutex_); 196 MappingTable mapping_table_ MOJO_GUARDED_BY(mapping_table_mutex_);
190 197
191 MOJO_DISALLOW_COPY_AND_ASSIGN(Core); 198 MOJO_DISALLOW_COPY_AND_ASSIGN(Core);
192 }; 199 };
193 200
194 } // namespace system 201 } // namespace system
195 } // namespace mojo 202 } // namespace mojo
196 203
197 #endif // MOJO_EDK_SYSTEM_CORE_H_ 204 #endif // MOJO_EDK_SYSTEM_CORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698