Beispiel #1
0
void accalt_finalize() {

#ifdef ARGOBOTS

    for (int i = 1; i < main_team->num_xstreams; i++) {
        ABT_xstream_join(main_team->team[i]);
        ABT_xstream_free(&main_team->team[i]);
    }
    ABT_finalize();

#endif
#ifdef MASSIVETHREADS
    myth_fini(); //MassiveThreads
#endif    
}
Beispiel #2
0
int main(int argc,char **argv)
{
	myth_init();
	myth_thread_t th=myth_create(test_thread,NULL);
	int i;
	for(i=0;i<YIELD_COUNT;i++){
#ifdef SHOW_LOG
		fprintf(stderr,"A%d\n",i);
#endif
		myth_yield2();
	}
	myth_join(th,NULL);
	myth_fini();
	printf("OK\n");
	return 0;
}
void chpl_task_exit(void) {
  // called by the main task
  enter_();
  myth_fini();
  return_from_();
}