xref: /original-bsd/lib/libcompat/4.3/insque.c (revision ae45e3e8)
1 /*
2  * Copyright (c) 1987, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  */
7 
8 #if defined(LIBC_SCCS) && !defined(lint)
9 static char sccsid[] = "@(#)insque.c	8.1 (Berkeley) 06/04/93";
10 #endif /* LIBC_SCCS and not lint */
11 
12 /*
13  * insque -- vax insque instruction
14  *
15  * NOTE: this implementation is non-atomic!!
16  */
17 
18 struct vaxque {		/* queue format expected by VAX queue instructions */
19 	struct vaxque	*vq_next;
20 	struct vaxque	*vq_prev;
21 };
22 
23 insque(e, prev)
24 	register struct vaxque *e, *prev;
25 {
26 	e->vq_prev = prev;
27 	e->vq_next = prev->vq_next;
28 	prev->vq_next->vq_prev = e;
29 	prev->vq_next = e;
30 }
31