
/* This file was automatically generated by pclu.*/

#include "pclu_err.h"
#include "pclu_sys.h"


extern struct dbg_info* dbg_info__cleanup_;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG _cleanup__TRACE
int _cleanup__TRACE;
extern struct OPS *int_ops;
static Vlist1 owns__cleanup_ = {0, 1,{ {0, 2, "_init", &int_ops}
}
};
extern errcode streamOP_close_all();
extern errcode _gprofOPcontrol();
extern errcode _gprofOPdump();
extern OWN_req stream_ownreqs;
extern struct OPS *stream_ops;
CLUREF STR_gmon_056out;
static int _cleanup__own_init = 0;

/**** BEGIN PROCEDURE _cleanup_ ****/

errcode _cleanup_()
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        } locals;
    locals.DBG_INFO = dbg_info__cleanup_;
        if (_cleanup__own_init == 0) {
        stringOPcons("gmon.out", CLU_1, CLU_8, &STR_gmon_056out);
        _cleanup__own_init = 1;
    }
    enter_proc(3);

  LINE(4);
    {
    locals.err = streamOP_close_all();
    if (locals.err != ERR_ok) goto ex_0;
    }

  LINE(5);
    {
    locals.err = _gprofOPcontrol(CLU_0);
    if (locals.err != ERR_ok) goto ex_0;
    }

  LINE(6);
    {
    locals.err = _gprofOPdump(STR_gmon_056out);
    if (locals.err != ERR_ok) goto ex_0;
    }
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE _cleanup_ ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist0 *vals;
    siglist0 *sigs;
    Vlist2 *locals;
    Vlist1 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info__cleanup__actual;
static Vlist0 vals__cleanup_ = {0, 0};
static siglist0 sigs__cleanup_ = {0, 0};
static Vlist2 locals__cleanup_ = {0, 2,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops}}
};
static Vlist0 popowns__cleanup_ = {0, 0};
Slist0 tformals__cleanup_ = {0, 0};
Slist0 opformals__cleanup_ = {0, 0};
dbg_info__cleanup__actual dbg_info__cleanup__data = {0, 12, 
    "_cleanup_", "/common/pub/dcurtis-temp/pclu/sys/clu/_cleanup_", 0, 0, (int)_cleanup_, 0, 
    &vals__cleanup_, &sigs__cleanup_, &locals__cleanup_, &owns__cleanup_, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info__cleanup_ = (struct dbg_info*)&dbg_info__cleanup__data;
