diff options
author | blundell <blundell@chromium.org> | 2015-01-19 09:18:33 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-19 17:19:27 +0000 |
commit | 70fb54767b472a5edfb859e489beeeec7abdb0e4 (patch) | |
tree | 28e534ec774391a9f6571a1770e12a0d63ebf833 /mojo/public/platform/native/system_thunks.cc | |
parent | ba5f0233fa38f949e24f6274ba891fa652eab640 (diff) | |
download | chromium_src-70fb54767b472a5edfb859e489beeeec7abdb0e4.zip chromium_src-70fb54767b472a5edfb859e489beeeec7abdb0e4.tar.gz chromium_src-70fb54767b472a5edfb859e489beeeec7abdb0e4.tar.bz2 |
Move //mojo/{public, edk} underneath //third_party
This CL move //mojo/public and //mojo/edk to live in the following locations:
- //third_party/mojo/src/mojo/public
- //third_party/mojo/src/mojo/edk
It moves the related gypfiles from //mojo to //third_party/mojo and updates
them as necessary to account for the file moves. It also updates clients of the
mojo SDK and EDK targets in both GYP and GN. (Note that for GN, the mojo SDK
and EDK build systems are maintained in the Mojo repo and designed to be
flexible wrt the location of the SDK/EDK in a client repo, so no changes are
needed.
This CL does not update include paths to the code being moved to limit the
number of moving parts, instead relying on the include_dirs that the SDK and
EDK targets supply to their direct dependents to ensure that include paths
continue to resolve correctly.
NOPRESUBMIT=true
Review URL: https://codereview.chromium.org/814543006
Cr-Commit-Position: refs/heads/master@{#312129}
Diffstat (limited to 'mojo/public/platform/native/system_thunks.cc')
-rw-r--r-- | mojo/public/platform/native/system_thunks.cc | 168 |
1 files changed, 0 insertions, 168 deletions
diff --git a/mojo/public/platform/native/system_thunks.cc b/mojo/public/platform/native/system_thunks.cc deleted file mode 100644 index ed3227f..0000000 --- a/mojo/public/platform/native/system_thunks.cc +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "mojo/public/platform/native/system_thunks.h" - -#include <assert.h> - -#include "mojo/public/platform/native/thunk_export.h" - -extern "C" { - -static MojoSystemThunks g_thunks = {0}; - -MojoTimeTicks MojoGetTimeTicksNow() { - assert(g_thunks.GetTimeTicksNow); - return g_thunks.GetTimeTicksNow(); -} - -MojoResult MojoClose(MojoHandle handle) { - assert(g_thunks.Close); - return g_thunks.Close(handle); -} - -MojoResult MojoWait(MojoHandle handle, - MojoHandleSignals signals, - MojoDeadline deadline, - struct MojoHandleSignalsState* signals_state) { - assert(g_thunks.Wait); - return g_thunks.Wait(handle, signals, deadline, signals_state); -} - -MojoResult MojoWaitMany(const MojoHandle* handles, - const MojoHandleSignals* signals, - uint32_t num_handles, - MojoDeadline deadline, - uint32_t* result_index, - struct MojoHandleSignalsState* signals_states) { - assert(g_thunks.WaitMany); - return g_thunks.WaitMany(handles, signals, num_handles, deadline, - result_index, signals_states); -} - -MojoResult MojoCreateMessagePipe(const MojoCreateMessagePipeOptions* options, - MojoHandle* message_pipe_handle0, - MojoHandle* message_pipe_handle1) { - assert(g_thunks.CreateMessagePipe); - return g_thunks.CreateMessagePipe(options, message_pipe_handle0, - message_pipe_handle1); -} - -MojoResult MojoWriteMessage(MojoHandle message_pipe_handle, - const void* bytes, - uint32_t num_bytes, - const MojoHandle* handles, - uint32_t num_handles, - MojoWriteMessageFlags flags) { - assert(g_thunks.WriteMessage); - return g_thunks.WriteMessage(message_pipe_handle, bytes, num_bytes, handles, - num_handles, flags); -} - -MojoResult MojoReadMessage(MojoHandle message_pipe_handle, - void* bytes, - uint32_t* num_bytes, - MojoHandle* handles, - uint32_t* num_handles, - MojoReadMessageFlags flags) { - assert(g_thunks.ReadMessage); - return g_thunks.ReadMessage(message_pipe_handle, bytes, num_bytes, handles, - num_handles, flags); -} - -MojoResult MojoCreateDataPipe(const MojoCreateDataPipeOptions* options, - MojoHandle* data_pipe_producer_handle, - MojoHandle* data_pipe_consumer_handle) { - assert(g_thunks.CreateDataPipe); - return g_thunks.CreateDataPipe(options, data_pipe_producer_handle, - data_pipe_consumer_handle); -} - -MojoResult MojoWriteData(MojoHandle data_pipe_producer_handle, - const void* elements, - uint32_t* num_elements, - MojoWriteDataFlags flags) { - assert(g_thunks.WriteData); - return g_thunks.WriteData(data_pipe_producer_handle, elements, num_elements, - flags); -} - -MojoResult MojoBeginWriteData(MojoHandle data_pipe_producer_handle, - void** buffer, - uint32_t* buffer_num_elements, - MojoWriteDataFlags flags) { - assert(g_thunks.BeginWriteData); - return g_thunks.BeginWriteData(data_pipe_producer_handle, buffer, - buffer_num_elements, flags); -} - -MojoResult MojoEndWriteData(MojoHandle data_pipe_producer_handle, - uint32_t num_elements_written) { - assert(g_thunks.EndWriteData); - return g_thunks.EndWriteData(data_pipe_producer_handle, num_elements_written); -} - -MojoResult MojoReadData(MojoHandle data_pipe_consumer_handle, - void* elements, - uint32_t* num_elements, - MojoReadDataFlags flags) { - assert(g_thunks.ReadData); - return g_thunks.ReadData(data_pipe_consumer_handle, elements, num_elements, - flags); -} - -MojoResult MojoBeginReadData(MojoHandle data_pipe_consumer_handle, - const void** buffer, - uint32_t* buffer_num_elements, - MojoReadDataFlags flags) { - assert(g_thunks.BeginReadData); - return g_thunks.BeginReadData(data_pipe_consumer_handle, buffer, - buffer_num_elements, flags); -} - -MojoResult MojoEndReadData(MojoHandle data_pipe_consumer_handle, - uint32_t num_elements_read) { - assert(g_thunks.EndReadData); - return g_thunks.EndReadData(data_pipe_consumer_handle, num_elements_read); -} - -MojoResult MojoCreateSharedBuffer( - const struct MojoCreateSharedBufferOptions* options, - uint64_t num_bytes, - MojoHandle* shared_buffer_handle) { - assert(g_thunks.CreateSharedBuffer); - return g_thunks.CreateSharedBuffer(options, num_bytes, shared_buffer_handle); -} - -MojoResult MojoDuplicateBufferHandle( - MojoHandle buffer_handle, - const struct MojoDuplicateBufferHandleOptions* options, - MojoHandle* new_buffer_handle) { - assert(g_thunks.DuplicateBufferHandle); - return g_thunks.DuplicateBufferHandle(buffer_handle, options, - new_buffer_handle); -} - -MojoResult MojoMapBuffer(MojoHandle buffer_handle, - uint64_t offset, - uint64_t num_bytes, - void** buffer, - MojoMapBufferFlags flags) { - assert(g_thunks.MapBuffer); - return g_thunks.MapBuffer(buffer_handle, offset, num_bytes, buffer, flags); -} - -MojoResult MojoUnmapBuffer(void* buffer) { - assert(g_thunks.UnmapBuffer); - return g_thunks.UnmapBuffer(buffer); -} - -extern "C" THUNK_EXPORT size_t MojoSetSystemThunks( - const MojoSystemThunks* system_thunks) { - if (system_thunks->size >= sizeof(g_thunks)) - g_thunks = *system_thunks; - return sizeof(g_thunks); -} - -} // extern "C" |