Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VSs_impls > VSs__MC_shared_impl
comparison nanos-vss.c @ 45:19114b7a2357
extern decl to work with c++ name mangling
| author | Nina Engelhardt <nengel@mailbox.tu-berlin.de> |
|---|---|
| date | Thu, 20 Jun 2013 12:39:54 +0200 |
| parents | 8733d1299c3a |
| children | 6be6b0394537 |
comparison
equal
deleted
inserted
replaced
| 3:f8744f94a7be | 4:e0d5e232e47d |
|---|---|
| 31 VSsTaskStub* ts = (VSsTaskStub*) malloc(sizeof (VSsTaskStub)); | 31 VSsTaskStub* ts = (VSsTaskStub*) malloc(sizeof (VSsTaskStub)); |
| 32 void* alloc_data = malloc(data_size); | 32 void* alloc_data = malloc(data_size); |
| 33 *data = alloc_data; | 33 *data = alloc_data; |
| 34 ts->args = alloc_data; | 34 ts->args = alloc_data; |
| 35 | 35 |
| 36 nanos_device_t* dev = (nanos_device_t*) &const_data[1]; | |
| 37 | |
| 38 VSsTaskType* taskType = (VSsTaskType*) malloc(sizeof (VSsTaskType)); | 36 VSsTaskType* taskType = (VSsTaskType*) malloc(sizeof (VSsTaskType)); |
| 39 | 37 |
| 40 taskType->fn = *((VSsTaskFnPtr*) dev[0].arg); | 38 taskType->fn = *((VSsTaskFnPtr*)((nanos_device_t*) &const_data[1])->arg); |
| 41 taskType->sizeOfArgs = data_size; | 39 taskType->sizeOfArgs = data_size; |
| 42 | 40 |
| 43 ts->taskType = taskType; | 41 ts->taskType = taskType; |
| 44 | 42 |
| 45 *wd = (nanos_wd_t) ts; | 43 *wd = (nanos_wd_t) ts; |
| 119 }; | 117 }; |
| 120 * and devices[0].arg is the function to call | 118 * and devices[0].arg is the function to call |
| 121 * so ugly pointer tricks to get it from there | 119 * so ugly pointer tricks to get it from there |
| 122 */ | 120 */ |
| 123 | 121 |
| 124 nanos_device_t* dev = (nanos_device_t*) &const_data[1]; | |
| 125 | |
| 126 VSsTaskType* taskType = (VSsTaskType*) malloc(sizeof (VSsTaskType)); | 122 VSsTaskType* taskType = (VSsTaskType*) malloc(sizeof (VSsTaskType)); |
| 127 | 123 |
| 128 taskType->fn = *((VSsTaskFnPtr*) dev[0].arg); | 124 taskType->fn = *((VSsTaskFnPtr*)((nanos_device_t*) &const_data[1])->arg); |
| 129 taskType->numDeps = num_deps; | 125 taskType->numDeps = num_deps; |
| 130 taskType->depsTypes = depsTypes; | 126 taskType->depsTypes = depsTypes; |
| 131 taskType->depsSizes = depsSizes; | 127 taskType->depsSizes = depsSizes; |
| 132 taskType->sizeOfArgs = data_size; | 128 taskType->sizeOfArgs = data_size; |
| 133 | 129 |
