| Index: third_party/mojo/src/mojo/public/go/system/data_pipe.go
|
| diff --git a/third_party/mojo/src/mojo/public/go/system/data_pipe.go b/third_party/mojo/src/mojo/public/go/system/data_pipe.go
|
| index a433074beb7bcb4ec15d801d53ea728e1b145bf6..b79a1e0395c965452f96dcbbeccb3196c39b0e81 100644
|
| --- a/third_party/mojo/src/mojo/public/go/system/data_pipe.go
|
| +++ b/third_party/mojo/src/mojo/public/go/system/data_pipe.go
|
| @@ -86,9 +86,6 @@
|
| }
|
|
|
| func (h *dataPipeConsumer) ReadData(flags MojoReadDataFlags) (MojoResult, []byte) {
|
| - h.core.mu.Lock()
|
| - defer h.core.mu.Unlock()
|
| -
|
| cParams := C.MallocReadDataParams()
|
| defer C.FreeReadDataParams(cParams)
|
| *cParams.num_bytes = 0
|
| @@ -106,9 +103,6 @@
|
| }
|
|
|
| func (h *dataPipeConsumer) BeginReadData(numBytes int, flags MojoReadDataFlags) (MojoResult, []byte) {
|
| - h.core.mu.Lock()
|
| - defer h.core.mu.Unlock()
|
| -
|
| cParams := C.MallocTwoPhaseActionParams()
|
| defer C.FreeTwoPhaseActionParams(cParams)
|
| *cParams.num_bytes = C.uint32_t(numBytes)
|
| @@ -118,9 +112,6 @@
|
| }
|
|
|
| func (h *dataPipeConsumer) EndReadData(numBytesRead int) MojoResult {
|
| - h.core.mu.Lock()
|
| - defer h.core.mu.Unlock()
|
| -
|
| return MojoResult(C.MojoEndReadData(h.mojoHandle.cValue(), C.uint32_t(numBytesRead)))
|
| }
|
|
|
| @@ -129,9 +120,6 @@
|
| }
|
|
|
| func (h *dataPipeProducer) WriteData(data []byte, flags MojoWriteDataFlags) (MojoResult, int) {
|
| - h.core.mu.Lock()
|
| - defer h.core.mu.Unlock()
|
| -
|
| cParams := C.MallocWriteDataParams(C.uint32_t(len(data)))
|
| defer C.FreeWriteDataParams(cParams)
|
| *cParams.num_bytes = C.uint32_t(len(data))
|
| @@ -142,9 +130,6 @@
|
| }
|
|
|
| func (h *dataPipeProducer) BeginWriteData(numBytes int, flags MojoWriteDataFlags) (MojoResult, []byte) {
|
| - h.core.mu.Lock()
|
| - defer h.core.mu.Unlock()
|
| -
|
| cParams := C.MallocTwoPhaseActionParams()
|
| defer C.FreeTwoPhaseActionParams(cParams)
|
| *cParams.num_bytes = C.uint32_t(numBytes)
|
| @@ -154,8 +139,5 @@
|
| }
|
|
|
| func (h *dataPipeProducer) EndWriteData(numBytesWritten int) MojoResult {
|
| - h.core.mu.Lock()
|
| - defer h.core.mu.Unlock()
|
| -
|
| return MojoResult(C.MojoEndWriteData(h.mojoHandle.cValue(), C.uint32_t(numBytesWritten)))
|
| }
|
|
|