File:  [Research Unix] / researchv9 / jerq / sgs / inc / sdpsrc / hi / release.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:22:00 2018 UTC (8 years, 3 months ago) by root
Branches: belllabs, MAIN
CVS tags: researchv9-SUN3_old, researchv9-SUN3, HEAD
researchv9-SUN3(old)

/*
 * static char ID_relc[] = "@(#) release.c: 1.1 1/7/82";
 */

release(what,howmuch)
ITEMID what;
int    howmuch;
{
	int frameno,ordinal,tops;
	char *place, *scan;

	frameno = sojourn(what,YES);
	if(frameno<0) return(fatal("RL01 -- unable to find frame for release"));


	if( (ordinal = sp2or(XTRCTSP(what))) <0 )
		return(fatal("RL02 -- unknown space number"));

	place = manager[frameno].frame_pntr + (what & BYTEMASK);

	for(tops=global_frames[ordinal]->numbstax-1; tops >= 0; tops--)
		if( howmuch >= global_frame[ordinal]->sizestax[tops] )
		{
			(*( (ITEMID *)place )) = global_frame[ordinal] -> topstax[tops];
			global_frame[ordinal] -> topstax[tops] = what;
			manager[frameno].ref_chng = WRTN;
			break;
		}

	for(scan=place; scan<place+howmuch; *scan++=0);

	return(SUCCESS);

}

unix.superglobalmegacorp.com

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