SCO OpenServer
mditx_interfaceMT(D3mdi)
mditx_interfaceMT --
Multi-threaded interface routine for MP-aware drivers
Synopsis (Not in SVR5 version)
#include <sys/mdi.h>
void mditx_interfaceMT(
mditx_IFMT_t * txint,
mblk_t * msg);
Description
The
mditx_interfaceMT( )
function is called from the driver's
put( ),
service( ),
and interrupt routines to service the driver's write queue,
and also, for the
put( )
routine,
to issue a new transmit request to the adapter.
The service routine and interrupt routine call
mditx_interfaceMT( )
with a NULL msg argument.
The
put( )
routine calls
mditx_interface( )
with a non-NULL msg.
Usage
The actual code for this routine is provided below.
void
mditx_interfaceMT(mditx_IFMT_t * txint, mblk_t * msg)
{
int plev;
void * txr;
mblk_t * qmsg;
plev = lockb5(&txint->txlock);
while (txint->q->q_first
&& (txr = (*txint->get_txr)(txint->handle)) != NULL) {
qmsg = getq(txint->q);
unlockb(&txint->txlock, plev);
(*txint->process_msg)(txint->handle, txr, qmsg);
plev = lockb5(&txint->txlock);
}
if (msg != NULL) {
if (!txint->q->q_first
&& (txr = (*txint->get_txr)(txint->handle)) != NULL) {
unlockb(&txint->txlock, plev);
(*txint->process_msg)(txint->handle, txr, msg);
}
else {
unlockb(&txint->txlock, plev);
putq(txint->q, msg);
}
}
else
unlockb(&txint->txlock, plev);
return;
}
Context and synchronization
Blockable
context.
Hardware applicability
All
Version applicability
mdi:
1
Differences between versions
This function is not supported in MDI on SVR5
systems.
In DDI 8, use the
mdi_tx_if_init(D3mdi)
and related functions instead of
mditx_interfaceMT( ).
Return values
None.
References
lockb(D3oddi),
mditx_interface(D3mdi),
mditx_register(D3mdi)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005