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

Side by Side Diff: mojo/public/go/system/core.go

Issue 795593004: Update mojo sdk to rev cc531b32182099a5a034a99daff35ed5d38a61c8 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More workarounds for MSVC Created 5 years, 11 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
« no previous file with comments | « mojo/public/dart/src/interface.dart ('k') | mojo/public/go/system/impl/core_impl.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 package system 5 package system
6 6
7 import ( 7 import (
8 "unsafe" 8 "unsafe"
9 9
10 t "mojo/public/go/system/impl" 10 t "mojo/public/go/system/impl"
11 ) 11 )
12 12
13 // Core is an interface that defines the set of Mojo system APIs. 13 // Core is an interface that defines the set of Mojo system APIs.
14 type Core interface { 14 type Core interface {
15 // GetTimeTicksNow returns a monotonically increasing platform 15 // GetTimeTicksNow returns a monotonically increasing platform
16 // dependent tick count representing "right now". Resolution 16 // dependent tick count representing "right now". Resolution
17 » // depends on the systemconfiguration. 17 » // depends on the system configuration.
18 GetTimeTicksNow() t.MojoTimeTicks 18 GetTimeTicksNow() t.MojoTimeTicks
19 19
20 // Close closes the given handle. 20 // Close closes the given handle.
21 Close(handle t.MojoHandle) (result t.MojoResult) 21 Close(handle t.MojoHandle) (result t.MojoResult)
22 22
23 // Wait waits on the given handle until a signal indicated by signals 23 // Wait waits on the given handle until a signal indicated by signals
24 // is satisfied or it becomes known that no signal indicated by 24 // is satisfied or it becomes known that no signal indicated by
25 » // signals will ever be satisified or until deadline has passed. 25 » // signals will ever be satisfied or until deadline has passed.
26 » Wait(handle t.MojoHandle, signal t.MojoHandleSignals, deadline t.MojoDea dline) (result t.MojoResult) 26 » // Notes about return values:
27 » // |state| can be nil if the signal array could not be returned. This can
28 » // happen with errors such as MOJO_RESULT_INVALID_ARGUMENT.
29 » Wait(handle t.MojoHandle, signal t.MojoHandleSignals, deadline t.MojoDea dline) (result t.MojoResult, state *t.MojoHandleSignalsState)
27 30
28 // WaitMany behaves as if Wait were called on each handle/signal pair 31 // WaitMany behaves as if Wait were called on each handle/signal pair
29 // simultaneously and completing when the first Wait would complete. 32 // simultaneously and completing when the first Wait would complete.
30 » WaitMany(handles []t.MojoHandle, signals []t.MojoHandleSignals, deadline t.MojoDeadline) (result t.MojoResult) 33 » // Notes about return values:
34 » // |index| can be nil if the error returned was not caused by a
35 » // particular handle. For example, the error MOJO_RESULT_DEADLINE_ EXCEEDED
36 // is not related to a particular handle.
37 » // |state| can be nil if the signal array could not be returned. This can
38 » // happen with errors such as MOJO_RESULT_INVALID_ARGUMENT.
39 » WaitMany(handles []t.MojoHandle, signals []t.MojoHandleSignals, deadline t.MojoDeadline) (result t.MojoResult, index *uint32, state []t.MojoHandleSignal sState)
31 40
32 // CreateMessagePipe creates a message pipe which is a bidirectional 41 // CreateMessagePipe creates a message pipe which is a bidirectional
33 // communication channel for framed data (i.e., messages). Messages 42 // communication channel for framed data (i.e., messages). Messages
34 // can contain plain data and/or Mojo handles. On success, it returns 43 // can contain plain data and/or Mojo handles. On success, it returns
35 // handles to the two endpoints of the message pipe. 44 // handles to the two endpoints of the message pipe.
36 CreateMessagePipe(opts *t.MessagePipeOptions) (result t.MojoResult, hand le0 t.MojoHandle, handle1 t.MojoHandle) 45 CreateMessagePipe(opts *t.MessagePipeOptions) (result t.MojoResult, hand le0 t.MojoHandle, handle1 t.MojoHandle)
37 46
38 // WriteMessage writes message data and optional attached handles to 47 // WriteMessage writes message data and optional attached handles to
39 // the message pipe endpoint given by handle. On success the attached 48 // the message pipe endpoint given by handle. On success the attached
40 // handles will no longer be valid (ie: the receiver will receive 49 // handles will no longer be valid (ie: the receiver will receive
(...skipping 29 matching lines...) Expand all
70 DuplicateBufferHandle(handle t.MojoHandle, opts *t.DuplicateBufferHandle Options) (result t.MojoResult, duplicate t.MojoHandle) 79 DuplicateBufferHandle(handle t.MojoHandle, opts *t.DuplicateBufferHandle Options) (result t.MojoResult, duplicate t.MojoHandle)
71 80
72 // MapBuffer maps the requested part of the shared buffer given by 81 // MapBuffer maps the requested part of the shared buffer given by
73 // handle into memory with specified flags. On success, it returns 82 // handle into memory with specified flags. On success, it returns
74 // a pointer to the requested shared buffer. 83 // a pointer to the requested shared buffer.
75 MapBuffer(handle t.MojoHandle, offset uint64, numBytes uint64, flags t.M ojoMapBufferFlags) (result t.MojoResult, buffer unsafe.Pointer) 84 MapBuffer(handle t.MojoHandle, offset uint64, numBytes uint64, flags t.M ojoMapBufferFlags) (result t.MojoResult, buffer unsafe.Pointer)
76 85
77 // UnmapBuffer unmaps a buffer pointer that was returned by MapBuffer. 86 // UnmapBuffer unmaps a buffer pointer that was returned by MapBuffer.
78 UnmapBuffer(buffer unsafe.Pointer) (result t.MojoResult) 87 UnmapBuffer(buffer unsafe.Pointer) (result t.MojoResult)
79 } 88 }
OLDNEW
« no previous file with comments | « mojo/public/dart/src/interface.dart ('k') | mojo/public/go/system/impl/core_impl.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698