Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ datab(D4DK) — Motorola System V 88k Release 4 Version 4.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

datab(D4DK)  —  

NAME

datab − STREAMS data block structure

SYNOPSIS

#include <sys/types.h>
#include <sys/stream.h>

DESCRIPTION

The datab structure describes the data of a STREAMS message.  The actual data contained in a STREAMS message is stored in a data buffer pointed to by this structure. A message block structure [msgb(D4DK)] includes a field that points to a datab structure. 

A data block can have more than one message block pointing to it at one time, so the db_ref member keeps track of a data block’s references, preventing it from being deallocated until all message blocks are finished with it. 

STRUCTURE MEMBERS

uchar_t ∗db_base; /∗ first byte of buffer ∗/
uchar_t ∗db_lim; /∗ last byte (+1) of buffer ∗/
uchar_t db_ref; /∗ # of message pointers to this data ∗/
uchar_t db_type; /∗ message type ∗/

The db_base field points to the beginning of the data buffer.  Drivers and modules should not change this field. 

The db_lim field points to one byte past the end of the data buffer.  Drivers and modules should not change this field. 

The db_ref field contains a count of the number of message blocks sharing the data buffer.  If it is greater than 1, drivers and modules should not change the contents of the data buffer.  Drivers and modules should not change this field. 

The db_type field contains the message type associated with the data buffer.  This field can be changed by the driver.  However, if the db_ref field is greater than 1, this field should not be changed. 

NOTES

The datab structure is defined as type dblk_t. 

SEE ALSO

Programmer’s Guide: STREAMS

free_rtn(D4DK), msgb(D4DK), messages(D5DK)

DDI/DKI  —  STREAMS

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