Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VSs_impls > VSs__MC_shared_impl
changeset 45:19114b7a2357 dev_expl_VP_and_DKU
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 | 7e7f37aa2f61 |
children | 6be6b0394537 |
files | VSs.c nanos-vss.c |
diffstat | 2 files changed, 6 insertions(+), 8 deletions(-) [+] |
line diff
1.1 --- a/VSs.c Tue Jun 11 15:40:51 2013 +0200 1.2 +++ b/VSs.c Thu Jun 20 12:39:54 2013 +0200 1.3 @@ -944,6 +944,8 @@ 1.4 return creatingSlv->dataRetFromReq; 1.5 } 1.6 1.7 +extern int __program_main(int argc, char** argv); 1.8 + 1.9 int __main_ret; 1.10 1.11 void __entry_point(void* _args) { 1.12 @@ -959,4 +961,4 @@ 1.13 args.argv = argv; 1.14 VSs__create_seed_slave_and_do_work(__entry_point, (void*) &args); 1.15 return __main_ret; 1.16 -} 1.17 \ No newline at end of file 1.18 +}
2.1 --- a/nanos-vss.c Tue Jun 11 15:40:51 2013 +0200 2.2 +++ b/nanos-vss.c Thu Jun 20 12:39:54 2013 +0200 2.3 @@ -33,11 +33,9 @@ 2.4 *data = alloc_data; 2.5 ts->args = alloc_data; 2.6 2.7 - nanos_device_t* dev = (nanos_device_t*) &const_data[1]; 2.8 - 2.9 VSsTaskType* taskType = (VSsTaskType*) malloc(sizeof (VSsTaskType)); 2.10 2.11 - taskType->fn = *((VSsTaskFnPtr*) dev[0].arg); 2.12 + taskType->fn = *((VSsTaskFnPtr*)((nanos_device_t*) &const_data[1])->arg); 2.13 taskType->sizeOfArgs = data_size; 2.14 2.15 ts->taskType = taskType; 2.16 @@ -121,11 +119,9 @@ 2.17 * so ugly pointer tricks to get it from there 2.18 */ 2.19 2.20 - nanos_device_t* dev = (nanos_device_t*) &const_data[1]; 2.21 - 2.22 VSsTaskType* taskType = (VSsTaskType*) malloc(sizeof (VSsTaskType)); 2.23 2.24 - taskType->fn = *((VSsTaskFnPtr*) dev[0].arg); 2.25 + taskType->fn = *((VSsTaskFnPtr*)((nanos_device_t*) &const_data[1])->arg); 2.26 taskType->numDeps = num_deps; 2.27 taskType->depsTypes = depsTypes; 2.28 taskType->depsSizes = depsSizes; 2.29 @@ -224,4 +220,4 @@ 2.30 2.31 void nanos_omp_set_interface ( void * arg){ 2.32 return; 2.33 -} 2.34 \ No newline at end of file 2.35 +}