Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VSs_impls > VSs__MC_shared_impl
comparison VSs.h @ 37:c8d4f6d3c7d3
hide animating VP and entry point
| author | Nina Engelhardt <nengel@mailbox.tu-berlin.de> |
|---|---|
| date | Wed, 15 May 2013 15:25:55 +0200 |
| parents | 227db52cbd93 |
| children | a951b38d2cfc |
comparison
equal
deleted
inserted
replaced
| 27:19fd5e5b8079 | 29:87f2ff0d2db0 |
|---|---|
| 37 | 37 |
| 38 //=========================================================================== | 38 //=========================================================================== |
| 39 /*This header defines everything specific to the VSs semantic plug-in | 39 /*This header defines everything specific to the VSs semantic plug-in |
| 40 */ | 40 */ |
| 41 typedef struct _VSsSemReq VSsSemReq; | 41 typedef struct _VSsSemReq VSsSemReq; |
| 42 typedef void (*VSsTaskFnPtr ) ( void *, SlaveVP *); | 42 typedef void (*VSsTaskFnPtr ) ( void * ); |
| 43 typedef void (*PtrToAtomicFn ) ( void * ); //executed atomically in master | 43 typedef void (*PtrToAtomicFn ) ( void * ); //executed atomically in master |
| 44 //=========================================================================== | 44 //=========================================================================== |
| 45 | 45 |
| 46 #define NONCTLD 0 | 46 #define NONCTLD 0 |
| 47 #define IN 1 /*Trick -- READER same as IN*/ | 47 #define IN 1 /*Trick -- READER same as IN*/ |
| 316 SlaveVP * | 316 SlaveVP * |
| 317 VSs__create_thread( TopLevelFnPtr fnPtr, void *initData, | 317 VSs__create_thread( TopLevelFnPtr fnPtr, void *initData, |
| 318 SlaveVP *creatingThd ); | 318 SlaveVP *creatingThd ); |
| 319 | 319 |
| 320 void | 320 void |
| 321 VSs__end_thread( SlaveVP *thdToEnd ); | 321 VSs__end_thread(); |
| 322 | 322 |
| 323 //======================= | 323 //======================= |
| 324 | 324 |
| 325 #define VSs__malloc( numBytes, callingSlave ) VMS_App__malloc( numBytes, callingSlave) | 325 #define VSs__malloc( numBytes, callingSlave ) VMS_App__malloc( numBytes, callingSlave) |
| 326 | 326 |
| 327 #define VSs__free(ptrToFree, callingSlave ) VMS_App__free( ptrToFree, callingSlave ) | 327 #define VSs__free(ptrToFree, callingSlave ) VMS_App__free( ptrToFree, callingSlave ) |
| 328 | 328 |
| 329 | 329 |
| 330 //======================= | 330 //======================= |
| 331 void | 331 void |
| 332 VSs__submit_task( VSsTaskType *taskType, void *args, SlaveVP *animSlv); | 332 VSs__submit_task( VSsTaskType *taskType, void *args); |
| 333 | 333 |
| 334 int32 * | 334 int32 * |
| 335 VSs__create_taskID_of_size( int32 numInts, SlaveVP *animSlv ); | 335 VSs__create_taskID_of_size( int32 numInts); |
| 336 | 336 |
| 337 void | 337 void |
| 338 VSs__submit_task_with_ID( VSsTaskType *taskType, void *args, int32 *taskID, | 338 VSs__submit_task_with_ID( VSsTaskType *taskType, void *args, int32 *taskID); |
| 339 SlaveVP *animSlv); | 339 |
| 340 | 340 void |
| 341 void | 341 VSs__end_task(); |
| 342 VSs__end_task( SlaveVP *animSlv ); | |
| 343 | 342 |
| 344 //========================= | 343 //========================= |
| 345 void | 344 void |
| 346 VSs__taskwait(SlaveVP *animSlv); | 345 VSs__taskwait(); |
| 347 | 346 |
| 348 void | 347 void |
| 349 VSs__taskwait_on(SlaveVP *animSlv,void* ptr); | 348 VSs__taskwait_on(void* ptr); |
| 350 | 349 |
| 351 void | 350 void |
| 352 VSs__start_critical(SlaveVP *animSlv,int32 name); | 351 VSs__start_critical(int32 name); |
| 353 | 352 |
| 354 void | 353 void |
| 355 VSs__end_critical(SlaveVP *animSlv,int32 name); | 354 VSs__end_critical(int32 name); |
| 356 | 355 |
| 357 int32 * | 356 int32 * |
| 358 VSs__give_self_taskID( SlaveVP *animSlv ); | 357 VSs__give_self_taskID(); |
| 359 | 358 |
| 360 void | 359 void |
| 361 VSs__send_of_type_to( void *msg, const int32 type, int32 *receiverID, | 360 VSs__send_of_type_to( void *msg, const int32 type, int32 *receiverID); |
| 362 SlaveVP *senderSlv ); | 361 |
| 363 | 362 void |
| 364 void | 363 VSs__send_from_to( void *msg, int32 *senderID, int32 *receiverID); |
| 365 VSs__send_from_to( void *msg, int32 *senderID, int32 *receiverID, SlaveVP *senderSlv ); | |
| 366 | 364 |
| 367 void * | 365 void * |
| 368 VSs__receive_type_to( const int32 type, int32* receiverID, SlaveVP *receiverSlv ); | 366 VSs__receive_type_to( const int32 type, int32* receiverID ); |
| 369 | 367 |
| 370 void * | 368 void * |
| 371 VSs__receive_from_to( int32 *senderID, int32 *receiverID, SlaveVP *receiverSlv ); | 369 VSs__receive_from_to( int32 *senderID, int32 *receiverID ); |
| 372 | 370 |
| 373 //======================= Concurrency Stuff ====================== | 371 //======================= Concurrency Stuff ====================== |
| 374 void | 372 void |
| 375 VSs__start_fn_singleton( int32 singletonID, SlaveVP *animSlv ); | 373 VSs__start_fn_singleton( int32 singletonID ); |
| 376 | 374 |
| 377 void | 375 void |
| 378 VSs__end_fn_singleton( int32 singletonID, SlaveVP *animSlv ); | 376 VSs__end_fn_singleton( int32 singletonID ); |
| 379 | 377 |
| 380 void | 378 void |
| 381 VSs__start_data_singleton( VSsSingleton **singeltonAddr, SlaveVP *animSlv ); | 379 VSs__start_data_singleton( VSsSingleton **singeltonAddr ); |
| 382 | 380 |
| 383 void | 381 void |
| 384 VSs__end_data_singleton( VSsSingleton **singletonAddr, SlaveVP *animSlv ); | 382 VSs__end_data_singleton( VSsSingleton **singletonAddr ); |
| 385 | 383 |
| 386 void | 384 void |
| 387 VSs__animate_short_fn_in_isolation( PtrToAtomicFn ptrToFnToExecInMaster, | 385 VSs__animate_short_fn_in_isolation( PtrToAtomicFn ptrToFnToExecInMaster, |
| 388 void *data, SlaveVP *animSlv ); | 386 void *data ); |
| 389 | 387 |
| 390 void | 388 void |
| 391 VSs__start_transaction( int32 transactionID, SlaveVP *animSlv ); | 389 VSs__start_transaction( int32 transactionID ); |
| 392 | 390 |
| 393 void | 391 void |
| 394 VSs__end_transaction( int32 transactionID, SlaveVP *animSlv ); | 392 VSs__end_transaction( int32 transactionID ); |
| 395 | 393 |
| 396 | 394 |
| 397 //========================= Internal use only ============================= | 395 //========================= Internal use only ============================= |
| 398 void | 396 void |
| 399 VSs__Request_Handler( SlaveVP *requestingSlv, void *_semEnv ); | 397 VSs__Request_Handler( SlaveVP *requestingSlv, void *_semEnv ); |
| 416 SlaveVP * | 414 SlaveVP * |
| 417 VSs__create_slave_with_affinity( TopLevelFnPtr fnPtr, void *initData, | 415 VSs__create_slave_with_affinity( TopLevelFnPtr fnPtr, void *initData, |
| 418 SlaveVP *creatingSlv, int32 coreToAssignOnto); | 416 SlaveVP *creatingSlv, int32 coreToAssignOnto); |
| 419 | 417 |
| 420 void | 418 void |
| 421 idle_fn(void* data, SlaveVP *animatingSlv); | 419 idle_fn(void* data); |
| 422 | 420 |
| 423 void | 421 void |
| 424 resume_slaveVP(SlaveVP *slave, VSsSemEnv *semEnv); | 422 resume_slaveVP(SlaveVP *slave, VSsSemEnv *semEnv); |
| 425 | 423 |
| 426 //===================== Measurement of Lang Overheads ===================== | 424 //===================== Measurement of Lang Overheads ===================== |
| 427 #include "Measurement/VSs_Measurement.h" | 425 #include "Measurement/VSs_Measurement.h" |
| 428 | 426 |
| 429 //=========================================================================== | 427 //=========================================================================== |
| 428 | |
| 429 /* Hide entry point trick */ | |
| 430 | |
| 431 typedef struct { | |
| 432 int argc; | |
| 433 char** argv; | |
| 434 } __main_args; | |
| 435 | |
| 436 extern int __main_ret; | |
| 437 | |
| 438 int __program_main(int argc, char** argv); | |
| 439 | |
| 440 void __entry_point(void* _args); | |
| 441 | |
| 442 int main(int argc, char** argv); | |
| 443 | |
| 444 | |
| 445 #define main __program_main | |
| 446 | |
| 430 #endif /* _VSs_H */ | 447 #endif /* _VSs_H */ |
| 431 | 448 |
