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. |
The attach routine is part of the Device Queue Management kernel extension. 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.
The attach-device routine can be called from the process environment only.