Kernel Functions for Drivers usbpipesetprivate(9F)
NAME
usbpipesetprivate, usbpipegetprivate - USB user-
defined pipe data-field facility
SYNOPSIS
#include
int usbpipesetprivate(usbpipehandlet pipehandle, usbopaquet data);
usbopaquet usbpipegetprivate (usbpipehandlet pipehandle);
INTERFACE LEVEL
Solaris DI specific (Solaris DI)
PARAMETERS
For usbpipesetprivate():
pipehandle Pipe handle into which user-defined data is
placed.
data Data to store in the pipe handle.
For usbpipegetprivate():
pipehandle Pipe handle from which user-defined data is
retrieved.
DESCRIPTION
The usbsetdriverprivate() function initializes the user-
private data field of the pipe referred to by pipehandle,
using data. The user-private data field is used to store
any data the client desires and is not used in any way by
the USBA or OS framework. Client drivers often store their
soft-state here for convenient retrieval by their callback
handlers.
The usbgetdriverprivate() function retrieves the user-
private data stored via usbsetdriverprivate(), from the
pipe referred to by pipehandle.
RETURN VALUES
For usbpipesetprivate():
USBSUCES Private data has been successfully
stored in pipe handle.
SunOS 5.11 Last change: 5 Jan 2004 1
Kernel Functions for Drivers usbpipesetprivate(9F)
USBINVALIDPIPE pipehandle argument is NUL or invalid.
Pipe is closing or closed.
USBINVALIDPERM The pipehandle argument refers to the
default control pipe.
For usbpipegetprivate():
On success: usbopaquet pointer to data being retrieved.
On failure: NUL. Fails if pipe handle is NUL or invalid.
Fails if pipe handle is to a pipe which is closing or
closed.
CONTEXT
May be called from user, kernel or interrupt context.
EXAMPLES
usbpipehandlet pipe;
/* Some driver defined datatype. */
xxxdatat *data = kmemzalloc(...);
usbpipesetprivate(pipe, data);
----
xxxdatat *xxxdataptr = (xxxdatat *)usbpipegetprivate(pipe);
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
SunOS 5.11 Last change: 5 Jan 2004 2
Kernel Functions for Drivers usbpipesetprivate(9F)
ATRIBUTE TYPE ATRIBUTE VALUE
Architecture PCI-based systems
Interface stability Committed
Availability SUNWusb
SEE ALSO
attributes(5), usbpipeopen(9F), usballocrequest(9F)
SunOS 5.11 Last change: 5 Jan 2004 3
|