[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 1

attach Device Queue Management Routine


Provides a means for performing device-specific processing when the attchq kernel service is called.


#include <sys/types.h>
#include <sys/errno.h>
#include <sys/deviceq.h>

int attach (dev_parms, path_id)
caddr_t dev_parms;
cba_id path_id;


dev_parms Passed to the creatd kernel service when the attach routine is defined.
path_id Specifies the path identifier for the queue being attached to.


Each device queue can have an attach routine. This routine is optional and must be specified when the creatd kernel service defines the device queue. The attchq service calls the attach routine each time a new path is created to the owning device queue. The processing performed by this routine is dependent on the server function.

The attach routine executes under the process under which the attchq kernel service is called. The kernel does not serialize the execution of this service with the execution of any other server routines.

Execution Environment

The attach-device routine can be called from the process environment only.

Return Values

RC_GOOD Indicates a successful completion.
RC_NONE Indicates that resources such as pinned memory are unavailable.
RC_MAX Indicates that the server already has the maximum number of users that it supports.
Greater than or equal to RC_DEVICE Indicates device-specific errors.

Implementation Specifics

The attach routine is part of the Device Queue Management kernel extension.

[ Previous | Next | Contents | Home | Search ]