Contained Within
Find More Documentation
Featured Support Resources
| PDF로 이 문서 다운로드
NAME
- cb_ops - character/block entry points structure
SYNOPSIS
-
#include <sys/conf.h>
INTERFACE LEVEL
- Solaris DDI specific (Solaris DDI).
DESCRIPTION
-
cb_ops contains all entry points for drivers that support both character and block entry points. All leaf device drivers supporting direct user process access to a device should declare a cb_ops.
- All drivers which safely allow multiple threads of execution in the driver at the same time should set the cb_flag to D_MP.
- If the driver is properly handles 64-bit offsets it should also set the D_64BIT flag in the cb_flag field. This specifies that the driver will use the uio_loffset field of the uio (9S) structure.
- Non-STREAMS drivers should set cb_str to NULL.
- The following DDI/DKI or DKI-only or DDI-only functions are provided in the character/block driver operations structure.
- block/char Function Description
-
- b/c
- XXopen
- DDI/DKI
-
-
b/c XXclose DDI/DKI
b XXstrategy DDI/DKI
b XXprint DDI/DKI
b XXdump DDI(Sun)
c XXread DDI/DKI
c XXwrite DDI/DKI
c XXioctl DDI/DKI
c XXdevmap DDI(Sun)
c XXmmap DKI
c XXsegmap DKI
c XXchpoll DDI/DKI
c XXprop_op DDI(Sun)
STRUCTURE MEMBERS
-
-
int
-
(* cb_open)(dev_t* devp,int flag, int otyp, cred_t * credp);
-
-
int (* cb_close)(dev_tdev, int flag, int otyp, cred_t * credp);
int (* cb_strategy)(structbuf * bp);
int (* cb_print)(dev_tdev, char * str);
int (* cb_dump)(dev_tdev, caddr_t addr, daddr_t blkno, int nblk);
int (* cb_read)(dev_tdev, struct uio * uiop,cred_t * credp);
int (* cb_write)(dev_tdev, struct uio * uiop,cred_t * credp);
int (* cb_ioctl)(dev_tdev, int cmd, int arg, int mode,
cred_t * credp,int * rvalp);
-
-
int (* cb_devmap)();
int (* cb_mmap)(dev_tdev, off_t off, int prot);
int (* cb_segmap)(dev_tdev, off_t off, struct as * asp,
caddr_t * addrp,off_t len, unsigned int prot,
unsigned int maxprot, unsigned int flags, cred_t * credp);
int (* cb_chpoll)(dev_tdev, short events, int anyyet,
short * reventsp,struct pollhead ** phpp);
int (* cb_prop_op)(dev_tdev, dev_info_t * dip,
ddi_prop_op_t prop_op, int mod_flags,
char * name,caddr_t valuep, int * length);
struct streamtab * cb_str; /* streams information * /
int cb_flag;
SEE ALSO
-
chpoll(9E), close(9E), dump(9E), ioctl(9E), mmap(9E), open(9E), print(9E), prop_op(9E), read (9E),segmap (9E),strategy(9E), write(9E), nochpoll(9F), nodev(9F), nulldev(9F), dev_ops(9S), qinit(9S)
-
Writing Device Drivers
-
STREAMS Programmer's Guide
NOTES
- The devmap entry point is not defined in this release and should be set to nodev.
|
|