Browse Source

Minimal maintenance to make this mess slightly less confusing:

queue -> list; mention "intrusive"; element -> member at one place;
delete a bogus remark that maybe referred to a long-gone
implementation in VAX assembly code.
Much more could be improved, but i don't want to waste too much time here.
OPENBSD_6_7
schwarze 4 years ago
parent
commit
33f1d1e7d9
1 changed files with 10 additions and 10 deletions
  1. +10
    -10
      src/lib/libc/stdlib/insque.3

+ 10
- 10
src/lib/libc/stdlib/insque.3 View File

@ -1,4 +1,4 @@
.\" $OpenBSD: insque.3,v 1.11 2020/04/26 13:59:56 jmc Exp $
.\" $OpenBSD: insque.3,v 1.12 2020/04/26 16:36:14 schwarze Exp $
.\" Copyright (c) 1993 John Brezak .\" Copyright (c) 1993 John Brezak
.\" All rights reserved. .\" All rights reserved.
.\" .\"
@ -32,7 +32,7 @@
.Sh NAME .Sh NAME
.Nm insque , .Nm insque ,
.Nm remque .Nm remque
.Nd insert/remove element from a queue
.Nd legacy doubly linked lists
.Sh SYNOPSIS .Sh SYNOPSIS
.In search.h .In search.h
.Ft void .Ft void
@ -49,9 +49,9 @@ macros and are provided for compatibility with legacy code.
.Fn insque .Fn insque
and and
.Fn remque .Fn remque
manipulate queues built from doubly linked lists.
The queue can be either circular or linear.
Each element in the queue must be of the following form:
manipulate a legacy variety of intrusive doubly linked lists.
A list can be either circular or linear.
Each element in the list must be of the following form:
.Bd -literal -offset indent .Bd -literal -offset indent
struct qelem { struct qelem {
struct qelem *q_forw; struct qelem *q_forw;
@ -60,25 +60,25 @@ struct qelem {
}; };
.Ed .Ed
.Pp .Pp
The first two elements in the struct must be pointers of the
The first two members of the struct must be pointers of the
same type that point to the next and previous elements in same type that point to the next and previous elements in
the queue respectively.
the list, respectively.
Any subsequent data in the struct is application-dependent. Any subsequent data in the struct is application-dependent.
.Pp .Pp
The The
.Fn insque .Fn insque
function inserts function inserts
.Fa elem .Fa elem
into a queue immediately after
into a list immediately after
.Fa pred . .Fa pred .
.Pp .Pp
The The
.Fn remque .Fn remque
function removes function removes
.Fa elem .Fa elem
from the queue.
from the list.
.Pp .Pp
These functions are not atomic unless that machine architecture allows it.
These functions are not atomic.
.Sh SEE ALSO .Sh SEE ALSO
.Xr queue 3 .Xr queue 3
.Sh STANDARDS .Sh STANDARDS


Loading…
Cancel
Save