Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

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

Media Vault

Software Library

Restoration Projects

Artifacts Sought

putctl1(D3DK)  —  

.IX \f4putctl1\fP(D3DK)

NAME

putctl1 − send a control message with a one-byte parameter to a queue

SYNOPSIS

#include <sys/stream.h>
int putctl1(queue_t ∗q, int type, int param);

ARGUMENTS

qPointer to the queue to which the message is to be sent. 

typeMessage type (must be control). 

paramOne-byte parameter. 

DESCRIPTION

putctl1, like putctl(D3DK), tests the type argument to make sure a data type has not been specified, and attempts to allocate a message block.  The param parameter can be used, for example, to specify the signal number when an M_PCSIG message is being sent.  putctl1 fails if type is M_DATA, M_PROTO, or M_PCPROTO, or if a message block cannot be allocated.  If successful, putctl1 calls the put(D2DK) routine of the queue pointed to by q, passing it the allocated message. 

RETURN VALUE

On success, 1 is returned.  Otherwise, if type is a data type, or if a message block cannot be allocated, 0 is returned. 

LEVEL

Base or Interrupt. 

NOTES

Does not sleep. 

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

The q argument to putctl1 and putnextctl1(D3DK) may not reference q_next (e.g. an argument of q->q_next is erroneous on a multiprocessor and is disallowed by the DDI/DKI).  putnextctl1(q, type, param) is provided as a multiprocessor-safe equivalent to the common call putctl1(q->q_next, type, param), which is no longer allowed. 

SEE ALSO

put(D2DK), put(D3DK), putctl(D3DK), putnextctl(D3DK), putnextctl1(D3DK)

EXAMPLE

See putctl(D3DK) for an example of putctl1. 

DDI/DKI  —  STREAMS

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