Example #1
0
static void* do_callMain(void* arg) {
  main_ptr_t chpl_main = (main_ptr_t) arg;

  // make sure this thread has thread-private data.
  setup_main_thread_private_data();

  // make sure that the lock report is set up.
  if (blockreport)
    initializeLockReportForThread();

  chpl_main();
  return NULL;
}
Example #2
0
void chpl_task_callMain(void (*chpl_main)(void)) {
  chpl_main();
}
//
// Have the tasking layer call the 'chpl_main' function pointer
// representing the entry point for the user's Chapel code.  This
// can either be done by invoking the function directly or by creating
// a task that evaluates the function.
//
void chpl_task_callMain(void (*chpl_main)(void)) {
  enter_();
  chpl_main();
  return_from_();
}