# 2.11BSD#431 - /usr/src/lib/libc/pdp/gen/insque.s

##### Functions

    _insque           X

       1: /*
       2:  * Copyright (c) 1987 Regents of the University of California.
       3:  * All rights reserved.  The Berkeley software License Agreement
       4:  * specifies the terms and conditions for redistribution.
       5:  */
       6:
       7: #ifdef LIBC_SCCS
       8:         <@(#)insque.s	1.2 (Berkeley) 1/20/87\0>
       9:         .even
      10: #endif LIBC_SCCS
      11:
      12: /*
      13:  * struct qelem
      14:  * {
      15:  *	struct qelem	*q_forw;
      16:  *	struct qelem	*q_back;
      17:  *	char		q_data[];
      18:  * }
      19:  *
      20:  * insque (elem, pred)
      21:  *   struct qelem  *elem, *pred
      22:  *
      23:  * Insert elem into queue with predecessor pred.
      24:  */
      25: #include "DEFS.h"
      26:
      27: ENTRY(insque)
      28:         mov     2(sp),r0        / r0 = elem
      29:         mov     4(sp),r1        / r1 = pred
      30:         mov     r1, 2(r0)       / elem->q_back = pred
      31:         mov     (r1),(r0)       / elem->q_forw = pred->q_forw
      32:         mov     r0,(r1)         / pred->q_forw = elem
      33:         mov     (r0),r1         / r1 = elem->q_forw  /* was pred->q_forw */
      34:         mov     r0,2(r1)        / elem->q_forw->q_back = elem
      35:         rts     pc

#### Defined functions

_insque defined in line 27; used 2 times

- in /usr/src/sbin/routed/tables.c line 149
- in /usr/src/ucb/PORT/systat/netstat.c line 208

Last modified: 1987-02-23 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 781 |