DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SCO OpenServer

mditx_interface(D3mdi)


mditx_interface -- Single-threaded interface routine for MP-aware drivers

Synopsis (Not in SVR5 version)

   #include <sys/mdi.h>
   

void mditx_interface(mditx_IF_t * txint, mblk_t * msg);

Description

The mditx_interface(D3mdi) function is called from the driver's put( ), service( ), and interrupt routines to service the driver's write queue, and for the put( ) routine, to issue a new transmit request to the adapter.

The service routine and interrupt routine call mditx_interface( ) with msg set to NULL. The put( ) routine calls mditx_interface( ) with a valid, non-NULL msg .

Usage

The actual code for this routine is provided below:
   void
   mditx_interface(mditx_IF_t * txint, mblk_t * msg)
   {
       mblk_t *	qmsg;
   

if (mdi_trylock(&txint->trylock) == TRUE) { while ((*txint->tx_avail)(txint->handle) && (qmsg = getq(txint->q))) (*txint->process_msg)(txint->handle, qmsg); if (msg != NULL) { if (!txint->q->q_first && (*txint->tx_avail)(txint->handle)) (*txint->process_msg)(txint->handle, msg); else putq(txint->q, msg); } mdi_tryunlock(&txint->trylock); } else if (msg != NULL) putq(txint->q, msg); 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_interface( ).

Return values

None.

References

mditx_interfaceMT(D3mdi), mditx_register(D3mdi), mdi_trylock(D3mdi)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005