SVR5
putnextctl1(D3str)
putnextctl1 --
send a control message with a one byte parameter to a queue
Synopsis (Not in ODDI)
#include <sys/stream.h>
#include <sys/ddi.h>
int putnextctl1(queue_t *q, int type, int param);
Description
putnextctl1 tests the type argument
to make sure a data type has not been specified,
and then attempts to allocate a message block.
If successful, putnextctl calls the
put(D2str)
procedure
of the queue pointed to by ``q->q_next'',
passing it the allocated message with the one byte parameter
specified by param.
Arguments
q-
Pointer to the queue from which the message is to be sent.
type-
Message type (must be a control type).
param-
One byte parameter.
Return values
Upon successful completion, putnextctl1 returns 1.
If type is a data type,
or if a message block cannot be allocated, 0 is returned.
putnextctl1 fails if type
is
M_DATA(D7str),
M_PROTO(D7str),
or
M_PCPROTO(D7str),
or if a message block cannot be allocated.
Usage
In multithreaded DDI drivers,
the q argument to
putctl1(D3str)
and putnextctl1 may not
reference q_next
(for example, an argument of q->q_next
is erroneous in a multithreaded driver
and is disallowed by the DDI).
putnextctl1(q, type) is provided
as a multiprocessor-safe equivalent
to the common call putctl1(q->q_next, type),
which is no longer allowed for DDI drivers.
Context
Base or Interrupt.
Synchronization constraints
Does not block.
Driver-defined basic locks, read/write locks, and sleep locks
may not be held across calls to this function.
The caller cannot have the stream frozen [see
freezestr(D3str)]
when calling this function.
Hardware applicability
All
Version applicability
ddi:
3, 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp, 8, 8mp
References
put(D2str),
put(D3str),
putctl(D3str),
putctl1(D3str),
putnextctl(D3str)
Examples
See
putnextctl(D3str)
for an example of putnextctl1.
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005