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.

The mi_close_comm utility is part of STREAMS kernel extensions.

Note:
  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

Item Description
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.