home *** CD-ROM | disk | FTP | other *** search
- /********************************************************/
- /* */
- /* the DEALLOCATION_CLEANUP_PROC */
- /* */
- /* */
- /* CopyRight 1995. Nicholas Poljakov all rights reserved*/
- /* */
- /********************************************************/
- #include <stdio.h>
- #include <rcb.h>
- #include <tcb.h>
- #include <state1.h>
- #include <drcb.h>
- #include <termps.h>
- #include <string.h>
- int sk_r_wt(void *);
- int SendBlock(void *, void *);
- int setrc(void *, void *);
- int sendhsf(void *);
- int sendhs(void *);
- int sendbm(void *, void *);
- int sendat(void *);
- int rtsend(void *);
- unsigned long rmfmh5(void *, void *);
- int recwait(void *);
- int rcvru(void *, void *);
- int rcvhs(void *, void *, void *, void *);
- int ralloc(void *, void *);
- int psrm(int, void *, void *);
- int ps_conv(int, void *);
- int proterr(void *, unsigned long);
- int preptrcv(void *, void *);
- int post_rcb(void *);
- struct repass *postopen(void *);
- int phsrec(void *);
- int pfmh5(void *);
- int opndst(void *);
- int obtsess(void *, unsigned char);
- int Lrf_handler(void *);
- int get_sess(void *, void *);
- int get_attr(void *);
- int fsm_error(unsigned char, void *);
- int fsm_conv(unsigned char, unsigned char, void *);
- int flush (void *);
- int dealloc(void *);
- int crtp(void *);
- int conv(void *);
- int chkparm(void *, void *);
- int check_end(unsigned int, void *);
- struct rqb *call_appl(void *);
- int buffmng(unsigned char, void *, void *, void *, unsigned, unsigned char, unsigned);
- unsigned long attltck(void *);
- unsigned long attacheck(void *);
- char *cgetmem(int, int);
- int sendhsf(void *);
- int opndst(void *);
- int alloc_rcb(void *, void *);
- int allocate(void *);
- int clsdst(void *);
- int bldfmh7(struct rcb *, unsigned long);
-
- int dcp(p_tcb)
- struct tcb *p_tcb;
- {
- struct rcb *p_rcb;
- struct termps p_t;
- int code_rec;
- unsigned long sense;
-
- #if OS_TYPE == 1
- /********* Trace facility **********/
- unsigned int rtype; /* type of record */
- unsigned int pnum; /* point number */
- char pname[8]; /* name of module */
- char *drec; /* record for dump */
- int lenr; /* record length */
-
- rtype = INPROC;
- strcpy(pname, "dcproc");
- pnum = 1;
- drec = p_tcb;
- lenr = sizeof(struct tcb);
- gtf(rtype, pname, pnum, drec, lenr);
- /***********************************/
- #endif
-
- p_rcb = p_tcb -> rcb_list_ptr;
-
- while (p_rcb != NULL) {
- if((p_rcb->conv_state != RESET)&(p_rcb->conv_state != END_CONV))
- /*
- * Issue DEALLOCATE type ABEND_PROG for still-allocated
- * resources.
- */
- {
- sense = 0x08640000; /* abend prog */
- bldfmh7(p_rcb, sense); /* Build and send FMH-7 */
- }
- p_rcb = p_rcb -> next;
- }
- /* »«ßδ½áѼ ¬ RM ºá»¿ß∞ terminate_ps */
-
- p_t.p_tcb = p_tcb;
- code_rec = TERMINATE_PS;
- psrm(code_rec, &p_t, 0);
- }
-