Annotation of researchv9/jerq/sgs/inc/sdpsrc/hi/flush.c, revision 1.1.1.1

1.1       root        1: /*
                      2:  * static char ID_flshc[] = "@(#) flush.c: 1.1 1/7/82";
                      3:  */
                      4: 
                      5: sdpterm(spacenbr)
                      6: int spacenbr;
                      7: {
                      8:        register int index, fdes;
                      9: 
                     10:        if( (spacenbr < 0)  ||  (spacenbr > MAXATTACH) )
                     11:                return( fatal("illegal space number") );
                     12: 
                     13:        if( open_spacenumbers[spacenbr] != YES )
                     14:                return( fatal("address space not open") );
                     15: 
                     16:        num_spaces--;
                     17:        open_spacenumbers[spacenbr] = NO;
                     18: 
                     19:        for( index = 0; index < NUMBERFRAMES; index++ ) {
                     20:        
                     21:                if( spacenbr != XTRCTSP(manager[index].page_id) )
                     22:                        continue;
                     23: 
                     24:                if( manager[index].lock_count > 0 )
                     25:                        return( fatal("not all in-core pages unlocked") );
                     26:                else if( manager[index].lock_count < 0 )
                     27:                        return( fatal("page lock count has gone negative") );
                     28:                
                     29:                if( (manager[index].ref_chng != WRTN)  &&
                     30:                    (manager[index].ref_chng != RNLY) )
                     31:                        return( fatal("illegal page ref/change value") );
                     32:                }
                     33:                
                     34:        for( index = 0; index < global_frames[spacenbr].numbfiles; index++ ) {
                     35:                fdes = global_frames[spacenbr].filedes[index];
                     36:                if( (fdes == NOTMADE) || (fdes == CLOSED) )
                     37:                        continue;
                     38:                if( close(fdes) == SYSERR )
                     39:                        return( fatal("can't close pageing file") );
                     40:                }
                     41: 
                     42:        return(SUCCESS);
                     43: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.