diff src/parallel_execution/context.h @ 327:534601ed8c50 examples_directory

Running dependency example for single thread and single task
author Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
date Tue, 18 Apr 2017 05:53:37 +0900
parents f23f6d0aa4e9
children de1e315379c6
line wrap: on
line diff
--- a/src/parallel_execution/context.h	Tue Apr 18 01:47:42 2017 +0900
+++ b/src/parallel_execution/context.h	Tue Apr 18 05:53:37 2017 +0900
@@ -45,6 +45,12 @@
     meta->size = len; \
     data; })
 
+#define ALLOCATE_DATA_GEAR(context, t) ({ \
+        union Data* data = ALLOCATE(context, t); \
+        struct Meta* meta = GET_META(data); \
+        meta->wait = createSingleLinkedQueue(context); \
+        data; })
+
 #define GET_META(dseg) ((struct Meta*)(((void*)dseg) - sizeof(struct Meta)))
 #define GET_TYPE(dseg) (GET_META(dseg)->type)
 #define GET_WAIT_LIST(dseg) (GET_META(dseg)->wait)