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

Unified Diff: mojo/public/c/system/core.h

Issue 293383007: Mojo: Move common/basic functions declarations from mojo/public/c/system/core.h to .../functions.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/mojo_public.gypi ('k') | mojo/public/c/system/functions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/c/system/core.h
diff --git a/mojo/public/c/system/core.h b/mojo/public/c/system/core.h
index 97afd700c6f55cee6410c98075461efb153f8c35..199d91891c134dae5494f0dd7848eff69dd98a78 100644
--- a/mojo/public/c/system/core.h
+++ b/mojo/public/c/system/core.h
@@ -2,13 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// Note: This header should be compilable as C.
+
#ifndef MOJO_PUBLIC_C_SYSTEM_CORE_H_
#define MOJO_PUBLIC_C_SYSTEM_CORE_H_
-// Note: This header should be compilable as C.
-
#include <stdint.h>
+#include "mojo/public/c/system/functions.h"
#include "mojo/public/c/system/macros.h"
#include "mojo/public/c/system/system_export.h"
#include "mojo/public/c/system/types.h"
@@ -206,72 +207,13 @@ const MojoMapBufferFlags MOJO_MAP_BUFFER_FLAG_NONE = 0;
// Functions -------------------------------------------------------------------
-// Note: Pointer parameters that are labeled "optional" may be null (at least
-// under some circumstances). Non-const pointer parameters are also labelled
-// "in", "out", or "in/out", to indicate how they are used. (Note that how/if
-// such a parameter is used may depend on other parameters or the requested
-// operation's success/failure. E.g., a separate |flags| parameter may control
-// whether a given "in/out" parameter is used for input, output, or both.)
+// Note: See the comment in functions.h about the meaning of the "optional"
+// label for pointer parameters.
#ifdef __cplusplus
extern "C" {
#endif
-// Platform-dependent monotonically increasing tick count representing "right
-// now." The resolution of this clock is ~1-15ms. Resolution varies depending
-// on hardware/operating system configuration.
-MOJO_SYSTEM_EXPORT MojoTimeTicks MojoGetTimeTicksNow();
-
-// Closes the given |handle|.
-//
-// Returns:
-// |MOJO_RESULT_OK| on success.
-// |MOJO_RESULT_INVALID_ARGUMENT| if |handle| is not a valid handle.
-//
-// Concurrent operations on |handle| may succeed (or fail as usual) if they
-// happen before the close, be cancelled with result |MOJO_RESULT_CANCELLED| if
-// they properly overlap (this is likely the case with |MojoWait()|, etc.), or
-// fail with |MOJO_RESULT_INVALID_ARGUMENT| if they happen after.
-MOJO_SYSTEM_EXPORT MojoResult MojoClose(MojoHandle handle);
-
-// Waits on the given handle until the state indicated by |flags| is satisfied
-// or until |deadline| has passed.
-//
-// Returns:
-// |MOJO_RESULT_OK| if some flag in |flags| was satisfied (or is already
-// satisfied).
-// |MOJO_RESULT_INVALID_ARGUMENT| if |handle| is not a valid handle (e.g., if
-// it has already been closed).
-// |MOJO_RESULT_DEADLINE_EXCEEDED| if the deadline has passed without any of
-// the flags being satisfied.
-// |MOJO_RESULT_FAILED_PRECONDITION| if it is or becomes impossible that any
-// flag in |flags| will ever be satisfied.
-//
-// If there are multiple waiters (on different threads, obviously) waiting on
-// the same handle and flag and that flag becomes set, all waiters will be
-// awoken.
-MOJO_SYSTEM_EXPORT MojoResult MojoWait(MojoHandle handle,
- MojoWaitFlags flags,
- MojoDeadline deadline);
-
-// Waits on |handles[0]|, ..., |handles[num_handles-1]| for at least one of them
-// to satisfy the state indicated by |flags[0]|, ..., |flags[num_handles-1]|,
-// respectively, or until |deadline| has passed.
-//
-// Returns:
-// The index |i| (from 0 to |num_handles-1|) if |handle[i]| satisfies
-// |flags[i]|.
-// |MOJO_RESULT_INVALID_ARGUMENT| if some |handle[i]| is not a valid handle
-// (e.g., if it has already been closed).
-// |MOJO_RESULT_DEADLINE_EXCEEDED| if the deadline has passed without any of
-// handles satisfying any of its flags.
-// |MOJO_RESULT_FAILED_PRECONDITION| if it is or becomes impossible that SOME
-// |handle[i]| will ever satisfy any of its flags |flags[i]|.
-MOJO_SYSTEM_EXPORT MojoResult MojoWaitMany(const MojoHandle* handles,
- const MojoWaitFlags* flags,
- uint32_t num_handles,
- MojoDeadline deadline);
-
// Message pipe:
// Creates a message pipe, which is a bidirectional communication channel for
« no previous file with comments | « mojo/mojo_public.gypi ('k') | mojo/public/c/system/functions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698