Mercurial > hg > Members > Moririn
comparison 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 |
comparison
equal
deleted
inserted
replaced
326:f23f6d0aa4e9 | 327:534601ed8c50 |
---|---|
42 union Data* data = context->heap; \ | 42 union Data* data = context->heap; \ |
43 context->heap += sizeof(struct dseg *)*len; \ | 43 context->heap += sizeof(struct dseg *)*len; \ |
44 meta->type = D_##dseg; \ | 44 meta->type = D_##dseg; \ |
45 meta->size = len; \ | 45 meta->size = len; \ |
46 data; }) | 46 data; }) |
47 | |
48 #define ALLOCATE_DATA_GEAR(context, t) ({ \ | |
49 union Data* data = ALLOCATE(context, t); \ | |
50 struct Meta* meta = GET_META(data); \ | |
51 meta->wait = createSingleLinkedQueue(context); \ | |
52 data; }) | |
47 | 53 |
48 #define GET_META(dseg) ((struct Meta*)(((void*)dseg) - sizeof(struct Meta))) | 54 #define GET_META(dseg) ((struct Meta*)(((void*)dseg) - sizeof(struct Meta))) |
49 #define GET_TYPE(dseg) (GET_META(dseg)->type) | 55 #define GET_TYPE(dseg) (GET_META(dseg)->type) |
50 #define GET_WAIT_LIST(dseg) (GET_META(dseg)->wait) | 56 #define GET_WAIT_LIST(dseg) (GET_META(dseg)->wait) |
51 | 57 |