DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SVR5

strioccall(D3str)


strioccall -- Invoke function as completion of an M_IOCTL operation

Synopsis (Not in ODDI)

   #include <sys/stream.h>
   #include <sys/ddi.h>
   

int strioccall(int (*func)(), void *arg, uint_t iocid, queue_t *q);

Description

strioccall allows a STREAMS driver (not a STREAMS module) to invoke a function in a driver in user context as the completion of an M_IOCTL(D7str) operation.

Arguments


func
driver function to be called

arg
argument to that function

iocid
copy of the ioc_id member of the iocblk(D4str) structure

q
driver's write queue

Return values

The strioccall function should return 0 for success, or the appropriate error number from those listed on errnos(D5) if an error occurs, such as insufficient memory to queue the request. The system call will usually return 0 on success or -1 on failure, with errno set to an appropriate value from the list on errnos(D5). However, the driver can choose to have the system call return a different value on success by passing the value through the rvalp pointer. EINVAL should be returned if a particular cmd is not supported by the driver.

Usage

func is called after the M_IOCACK(D7str) acknowledgement for this iocid has reached the stream head.

Context

Requestor

Synchronization constraints

Version applicability

ddi: 8, 8mp

Differences between versions

strioccall existed in earlier kernels but is not supported by earlier DDI versions.

References

iocblk(D4str), M_IOCACK(D7str), M_IOCTL(D7str)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005