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/c/environment/async_waiter.h | |
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/c/environment/async_waiter.h')
-rw-r--r-- | mojo/public/c/environment/async_waiter.h | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/mojo/public/c/environment/async_waiter.h b/mojo/public/c/environment/async_waiter.h deleted file mode 100644 index b5a1f75..0000000 --- a/mojo/public/c/environment/async_waiter.h +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2014 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. - -#ifndef MOJO_PUBLIC_C_ENVIRONMENT_ASYNC_WAITER_H_ -#define MOJO_PUBLIC_C_ENVIRONMENT_ASYNC_WAITER_H_ - -#include "mojo/public/c/system/types.h" - -typedef uintptr_t MojoAsyncWaitID; - -typedef void (*MojoAsyncWaitCallback)(void* closure, MojoResult result); - -// Functions for asynchronously waiting (and cancelling asynchronous waits) on a -// handle. -// -// Thread-safety: -// - |CancelWait(wait_id)| may only be called on the same thread as the -// |AsyncWait()| that provided |wait_id| was called on. -// - A given |MojoAsyncWaiter|'s functions may only be called on the thread(s) -// that it is defined to be valid on (typically including the thread on -// which the |MojoAsyncWaiter| was provided). E.g., a library may require -// initialization with a single |MojoAsyncWaiter| and stipulate that it only -// be used on threads on which that |MojoAsyncWaiter| is valid. -// - If a |MojoAsyncWaiter| is valid on multiple threads, then its functions -// must be thread-safe (subject to the first restriction above). -struct MojoAsyncWaiter { - // Arranges for |callback| to be called on the current thread at some future - // when |handle| satisfies |signals| or it is known that it will never satisfy - // |signals| (with the same behavior as |MojoWait()|). - // - // |callback| will not be called in the nested context of |AsyncWait()|, but - // only, e.g., from some run loop. |callback| is provided with the |closure| - // argument as well as the result of the wait. For each call to |AsyncWait()|, - // |callback| will be called at most once. - // - // |handle| must not be closed or transferred (via |MojoWriteMessage()|; this - // is equivalent to closing the handle) until either the callback has been - // executed or the async wait has been cancelled using the returned (nonzero) - // |MojoAsyncWaitID| (see |CancelWait()|). Otherwise, an invalid (or, worse, - // re-used) handle may be waited on by the implementation of this - // |MojoAsyncWaiter|. - // - // Note that once the callback has been called, the returned |MojoAsyncWaitID| - // becomes invalid. - MojoAsyncWaitID (*AsyncWait)(MojoHandle handle, - MojoHandleSignals signals, - MojoDeadline deadline, - MojoAsyncWaitCallback callback, - void* closure); - - // Cancels an outstanding async wait (specified by |wait_id|) initiated by - // |AsyncWait()|. This may only be called from the same thread on which the - // corresponding |AsyncWait()| was called, and may only be called if the - // callback to |AsyncWait()| has not been called. - // - // Once this has been called, the callback provided to |AsyncWait()| will not - // be called. Moreover, it is then immediately safe to close or transfer the - // handle provided to |AsyncWait()|. (I.e., the implementation of this - // |MojoAsyncWaiter| will no longer wait on, or do anything else with, the - // handle.) - void (*CancelWait)(MojoAsyncWaitID wait_id); -}; - -#endif // MOJO_PUBLIC_C_ENVIRONMENT_ASYNC_WAITER_H_ |