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

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

Issue 1374463002: Remove support for "all or none" two-phase data pipe read/write. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 2 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 // This interface wraps the "raw" mojo system entry points. This has no 7 // This interface wraps the "raw" mojo system entry points. This has no
8 // dependencies on other types in this package so it can be implemented 8 // dependencies on other types in this package so it can be implemented
9 // by code that doesn't depend on this package. 9 // by code that doesn't depend on this package.
10 type MojoSystem interface { 10 type MojoSystem interface {
11 // Shared buffer 11 // Shared buffer
12 CreateSharedBuffer(flags uint32, numBytes uint64) (result uint32, handle uint32) 12 CreateSharedBuffer(flags uint32, numBytes uint64) (result uint32, handle uint32)
13 DuplicateBufferHandle(handle uint32, flags uint32) (result uint32, dupHa ndle uint32) 13 DuplicateBufferHandle(handle uint32, flags uint32) (result uint32, dupHa ndle uint32)
14 // After a successful MapBuffer call, the caller must pass the same slic e value to UnmapBuffer to release 14 // After a successful MapBuffer call, the caller must pass the same slic e value to UnmapBuffer to release
15 // the underlying memory segment. 15 // the underlying memory segment.
16 MapBuffer(handle uint32, offset, numBytes uint64, flags uint32) (result uint32, buf []byte) 16 MapBuffer(handle uint32, offset, numBytes uint64, flags uint32) (result uint32, buf []byte)
17 UnmapBuffer(buf []byte) (result uint32) 17 UnmapBuffer(buf []byte) (result uint32)
18 18
19 // Data pipe 19 // Data pipe
20 CreateDataPipe(flags, elementNumBytes, capacityNumBytes uint32) (result uint32, producerHandle, consumerHandle uint32) 20 CreateDataPipe(flags, elementNumBytes, capacityNumBytes uint32) (result uint32, producerHandle, consumerHandle uint32)
21 CreateDataPipeWithDefaultOptions() (result uint32, producerHandle, consu merHandle uint32) 21 CreateDataPipeWithDefaultOptions() (result uint32, producerHandle, consu merHandle uint32)
22 WriteData(producerHandle uint32, buf []byte, flags uint32) (result uint3 2, bytesWritten uint32) 22 WriteData(producerHandle uint32, buf []byte, flags uint32) (result uint3 2, bytesWritten uint32)
23 » BeginWriteData(producerHandle uint32, numBytes uint32, flags uint32) (re sult uint32, buf []byte) 23 » BeginWriteData(producerHandle uint32, flags uint32) (result uint32, buf []byte)
24 EndWriteData(producerHandle uint32, numBytesWritten uint32) (result uint 32) 24 EndWriteData(producerHandle uint32, numBytesWritten uint32) (result uint 32)
25 25
26 ReadData(consumerHandle, flags uint32) (result uint32, buf []byte) 26 ReadData(consumerHandle, flags uint32) (result uint32, buf []byte)
27 » BeginReadData(consumerHandle uint32, numBytes uint32, flags uint32) (res ult uint32, buf []byte) 27 » BeginReadData(consumerHandle uint32, flags uint32) (result uint32, buf [ ]byte)
28 EndReadData(consumerHandle uint32, numBytesRead uint32) (result uint32) 28 EndReadData(consumerHandle uint32, numBytesRead uint32) (result uint32)
29 29
30 // Time 30 // Time
31 GetTimeTicksNow() (timestamp uint64) 31 GetTimeTicksNow() (timestamp uint64)
32 32
33 // Close a handle 33 // Close a handle
34 Close(handle uint32) (result uint32) 34 Close(handle uint32) (result uint32)
35 35
36 // Waiting 36 // Waiting
37 Wait(handle uint32, signals uint32, deadline uint64) (result uint32, sat isfiedSignals, satisfiableSignals uint32) 37 Wait(handle uint32, signals uint32, deadline uint64) (result uint32, sat isfiedSignals, satisfiableSignals uint32)
38 WaitMany(handles []uint32, signals []uint32, deadline uint64) (result ui nt32, index int, satisfiedSignals, satisfiableSignals []uint32) 38 WaitMany(handles []uint32, signals []uint32, deadline uint64) (result ui nt32, index int, satisfiedSignals, satisfiableSignals []uint32)
39 39
40 // Message pipe 40 // Message pipe
41 CreateMessagePipe(flags uint32) (result uint32, handle0, handle1 uint32) 41 CreateMessagePipe(flags uint32) (result uint32, handle0, handle1 uint32)
42 WriteMessage(handle uint32, bytes []byte, handles []uint32, flags uint32 ) (result uint32) 42 WriteMessage(handle uint32, bytes []byte, handles []uint32, flags uint32 ) (result uint32)
43 ReadMessage(handle uint32, flags uint32) (result uint32, buf []byte, han dles []uint32) 43 ReadMessage(handle uint32, flags uint32) (result uint32, buf []byte, han dles []uint32)
44 } 44 }
45 45
46 var sysImpl MojoSystem 46 var sysImpl MojoSystem
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698