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

Unified Diff: mojo/public/go/system/c_allocators.c

Issue 860193002: go/system: adding two-phase data pipe methods (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/go/system/c_allocators.h ('k') | mojo/public/go/system/data_pipe.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/go/system/c_allocators.c
diff --git a/mojo/public/go/system/c_allocators.c b/mojo/public/go/system/c_allocators.c
index 7af7bb2f7dbba284afcf373ec1cfa3fd6089ccc1..2f93908be747e5e179aa9b7f654f0acd393eabb3 100644
--- a/mojo/public/go/system/c_allocators.c
+++ b/mojo/public/go/system/c_allocators.c
@@ -157,3 +157,15 @@ void FreeWriteDataParams(struct WriteDataParams p) {
free(p.num_bytes);
free(p.elements);
}
+
+struct TwoPhaseActionParams MallocTwoPhaseActionParams() {
+ struct TwoPhaseActionParams p;
+ p.buffer = (void**)malloc(sizeof(void*));
+ p.num_bytes = (uint32_t*)malloc(sizeof(uint32_t));
+ return p;
+}
+
+void FreeTwoPhaseActionParams(struct TwoPhaseActionParams p) {
+ free(p.buffer);
+ free(p.num_bytes);
+}
« no previous file with comments | « mojo/public/go/system/c_allocators.h ('k') | mojo/public/go/system/data_pipe.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698