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

Side by Side Diff: mojo/public/system/core_private.cc

Issue 106173003: Split mojo_system dylib into public and private (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix win Created 7 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 | Annotate | Revision Log
« no previous file with comments | « mojo/public/system/core_private.h ('k') | mojo/public/system/system_export.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "mojo/public/system/core_private.h"
6
7 #include <assert.h>
8 #include <stddef.h>
9
10 static mojo::Core* g_core = NULL;
11
12 extern "C" {
13
14 MojoResult MojoClose(MojoHandle handle) {
15 assert(g_core);
16 return g_core->Close(handle);
17 }
18
19 MojoResult MojoWait(MojoHandle handle,
20 MojoWaitFlags flags,
21 MojoDeadline deadline) {
22 assert(g_core);
23 return g_core->Wait(handle, flags, deadline);
24 }
25
26 MojoResult MojoWaitMany(const MojoHandle* handles,
27 const MojoWaitFlags* flags,
28 uint32_t num_handles,
29 MojoDeadline deadline) {
30 assert(g_core);
31 return g_core->WaitMany(handles, flags, num_handles, deadline);
32 }
33
34 MojoResult MojoCreateMessagePipe(MojoHandle* handle_0, MojoHandle* handle_1) {
35 assert(g_core);
36 return g_core->CreateMessagePipe(handle_0, handle_1);
37 }
38
39 MojoResult MojoWriteMessage(MojoHandle handle,
40 const void* bytes, uint32_t num_bytes,
41 const MojoHandle* handles, uint32_t num_handles,
42 MojoWriteMessageFlags flags) {
43 assert(g_core);
44 return g_core->WriteMessage(handle,
45 bytes, num_bytes,
46 handles, num_handles,
47 flags);
48 }
49
50 MojoResult MojoReadMessage(MojoHandle handle,
51 void* bytes, uint32_t* num_bytes,
52 MojoHandle* handles, uint32_t* num_handles,
53 MojoReadMessageFlags flags) {
54 assert(g_core);
55 return g_core->ReadMessage(handle,
56 bytes, num_bytes,
57 handles, num_handles,
58 flags);
59 }
60
61 MojoTimeTicks MojoGetTimeTicksNow() {
62 assert(g_core);
63 return g_core->GetTimeTicksNow();
64 }
65
66 } // extern "C"
67
68 namespace mojo {
69
70 Core::~Core() {
71 }
72
73 void Core::Init(Core* core) {
74 assert(!g_core);
75 g_core = core;
76 }
77
78 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/system/core_private.h ('k') | mojo/public/system/system_export.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698