[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Communications, Volume 2


mi_close_comm Utility

Purpose

Performs housekeeping during STREAMS driver or module close operations.

Syntax

#include <pse/mi.h>
#include <sys/stream.h>


int mi_close_comm ( StaticPointer, Queue)
caddr_t *StaticPointer;
queue_t *Queue;

Description

The mi_close_comm utility performs housekeeping during STREAMS driver or module close operations. It is intended to be called by the driver or module close routine. It releases the memory allocated by the corresponding call to the mi_open_comm utility, and frees the minor number for reuse.

If an mi_bufcall operation is outstanding, module resources are not freed until the mi_buffcall operation is complete.

Notes:
  1. Each call to the mi_close_comm utility must have a corresponding call to the mi_open_comm utility. Executing one of these utilities without making a corresponding call to the other will lead to unpredictable results.
  2. The stream.h header file must be the last included header file of each source file using the stream library.

Parameters


StaticPointer Specifies the address of the static pointer which was passed to the corresponding call to the mi_open_comm utility to store the address of the module's list of open streams.
Queue Specifies the Queue parameter which was passed to the corresponding call to the mi_open_comm utility.

Return Values

The mi_close_comm utility always returns a value of zero.

Implementation Specifics

The mi_close_comm utility is part of STREAMS kernel extensions.

Related Information

List of Streams Programming References in AIX 5L Version 5.1 Communications Programming Concepts .

STREAMS Overview in AIX 5L Version 5.1 Communications Programming Concepts .

The mi_open_comm utility, mi_next_ptr utility, mi_bufcall utility.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]