File:  [XINU] / xinu / sys / newqueue.c
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:39:29 2018 UTC (8 years, 2 months ago) by root
Branches: xinu, MAIN
CVS tags: xinu-19910600, HEAD
Xinu for 68000/68010

/* newqueue.c  -  newqueue */

#include <conf.h>
#include <kernel.h>
#include <q.h>

/*------------------------------------------------------------------------
 * newqueue  --  initialize a new list in the q structure
 *------------------------------------------------------------------------
 */
int	newqueue(hindex,tindex)
	int	*hindex,*tindex;	/* addresses of integers to	*/
					/* contain head, tail indexes	*/
{
	struct	qent	*hptr;
	struct	qent	*tptr;

	hptr = &q[(*hindex)=nextqueue++]; /* assign and rememeber queue	*/
	tptr = &q[(*tindex)=nextqueue++]; /* index values for head&tail	*/
	hptr->qnext = *tindex;
	hptr->qprev = EMPTY;
	tptr->qnext = EMPTY;
	hptr->qkey  = MININT;
	tptr->qkey  = MAXINT;
	tptr->qprev = *hindex;
}

unix.superglobalmegacorp.com

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