Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] View of /branches/vis12/src/compiler/c-target/fragments/shutdown.in
ViewVC logotype

View of /branches/vis12/src/compiler/c-target/fragments/shutdown.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2807 - (download) (annotate)
Sat Nov 8 17:55:14 2014 UTC (6 years ago) by jhr
File size: 705 byte(s)
  Fix bug in shutdown fragment; proper tracking of HasGlobals property
//! shutdown and deallocate the world
void @PREFIX@Shutdown (@PREFIX@World_t *wrld)
{
    biffMsgNix (wrld->errors);
#ifndef DIDEROT_NO_GLOBALS
    FreeGlobals (wrld);
    FREE (wrld->globals);
#endif
#ifdef DIDEROT_TARGET_PARALLEL
    FREE (wrld->sched);
#endif

#ifdef DIDEROT_DUAL_STATE
  // free strand objects
    for (int i = 0;  i < wrld->numStrands;  i++) {
	FREE (wrld->inState[i]);
	FREE (wrld->outState[i]);
    }
#endif

  // free state arrays
#ifdef DIDEROT_DUAL_STATE
    FREE (wrld->inState);
    FREE (wrld->outState);
#else
    FREE (wrld->state);
#endif
    FREE (wrld->status);

  // free axis info
    FREE (wrld->base);
    FREE (wrld->size);

    FREE (wrld);

} // @PREFIX@Shutdown

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0