Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ unlinkb(D3DK) — Motorola System V 88k Release 4 Version 4.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

unlinkb(D3DK)  —  

.IX \f4unlinkb\fP(D3DK)

NAME

unlinkb − remove a message block from the head of a message

SYNOPSIS

#include <sys/stream.h>
mblk_t ∗unlinkb(mblk_t ∗mp);

ARGUMENTS

mpPointer to the message. 

DESCRIPTION

unlinkb removes the first message block from the message pointed to by mp.  The removed message block is not freed.  It is the caller’s responsibility to free it. 

RETURN VALUE

unlinkb returns a pointer to the remainder of the message after the first message block has been removed.  If there is only one message block in the message, NULL is returned. 

LEVEL

Base or Interrupt. 

NOTES

Does not sleep. 

Driver-defined basic locks, read/write locks, and sleep locks may be held across calls to this function. 

SEE ALSO

linkb(D3DK)

EXAMPLE

The routine expects to get passed an M_PROTO T_DATA_IND message.  It will remove and free the M_PROTO header and return the remaining M_DATA portion of the message. 

1  mblk_t ∗
2  makedata(mp)
3mblk_t ∗mp;
4  {
5mblk_t ∗nmp;
 6nmp = unlinkb(mp);
7freeb(mp);
8return(nmp);
9  }

.IX \f4freeb\fP(D3DK), example
.IX \f4unlinkb\fP(D3DK), example

DDI/DKI  —  STREAMS

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026